New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Context suggester's context doesn't work on keyword type #24129

Closed
masaruh opened this Issue Apr 17, 2017 · 4 comments

Comments

Projects
None yet
8 participants
@masaruh
Contributor

masaruh commented Apr 17, 2017

Elasticsearch version:
5.3.0

Description of the problem including expected versus actual behavior:
When contest field specified by path is text type, it works as expected. However, if it's set to keyword type, context is set to empty/null.

Steps to reproduce:
https://gist.github.com/masaruh/f217c26cf9b52ca71381b088f0e78630

It looks it's because when CategoryContextMappng reads field value, KeywordFieldType returns null (since it doesn't have string value).
Not sure if it's expected behavior or not. But if it's expected, it's better to be documented.

@vsiv

This comment has been minimized.

vsiv commented Apr 17, 2017

I can reproduce this as well on 5.3. I too am curious whether this is expected behavior. Does this suggest that the completion suggester is not ready for production use? I understand from the docs, parts of suggest functionality are still in dev. Thanks.

@vsiv

This comment has been minimized.

vsiv commented Apr 17, 2017

There is also a bug in the documentation. The first mapping should not have path configured since its consuming direct category values at index time.

https://www.elastic.co/guide/en/elasticsearch/reference/current/suggester-context.html

@jasontedor

This comment has been minimized.

Member

jasontedor commented Apr 18, 2017

@colings86 Can you take a look?

@colings86

This comment has been minimized.

Member

colings86 commented Apr 18, 2017

I've reproduced this on the current master branch and to me it looks like a bug. @areek are you able to take this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment