Skip to content
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

Issue with higlighting and analyzed tokens #8757

Closed
fxh opened this issue Dec 3, 2014 · 1 comment
Closed

Issue with higlighting and analyzed tokens #8757

fxh opened this issue Dec 3, 2014 · 1 comment
Labels
:Search/Highlighting How a query matched a document

Comments

@fxh
Copy link

fxh commented Dec 3, 2014

I am experiencing an unexpected result with highlighting when using an _analyzer path in the mapping and custom analyzers. The highlighting returns no result for some query terms, even though the term matches and the document is returned. For other query terms it works fine. Somehow it seems that for querying and highlighting a different analyzer is used.

See the following commands to reproduce the issue:

https://gist.github.com/fxh/3246df167e4d72b0372f

I am using ES v1.3.4

@tonibirrer
Copy link

Just adding to fxh's report that this started with 1.3.4. Previously we've been using 1.1.1 and there fxh's gist works.

@clintongormley clintongormley added the :Search/Highlighting How a query matched a document label Dec 4, 2014
masaruh added a commit to masaruh/elasticsearch that referenced this issue Dec 14, 2014
Make highlighter use analyzer set on the field.

Closes elastic#8757
masaruh added a commit to masaruh/elasticsearch that referenced this issue May 4, 2015
Make highlighter use analyzer set on the field.

Highlight with PlainHighlighter doesn't work on a field with an analyzer specified
when a document has document level analyzer specified by _analyzer.

With this fix, it first look for analyzer set on the field. If not found, try _analyzer's path.
If not found or _analyzer's path is null, try analyzer set on type level.

Closes elastic#8757
masaruh added a commit that referenced this issue May 7, 2015
Make highlighter use analyzer set on the field.

Highlight with PlainHighlighter doesn't work on a field with an analyzer specified
when a document has document level analyzer specified by _analyzer.

With this fix, it first look for analyzer set on the field. If not found, try _analyzer's path.
If not found or _analyzer's path is null, try analyzer set on type level.

Closes #8757
masaruh added a commit that referenced this issue May 7, 2015
Make highlighter use analyzer set on the field.

Highlight with PlainHighlighter doesn't work on a field with an analyzer specified
when a document has document level analyzer specified by _analyzer.

With this fix, it first look for analyzer set on the field. If not found, try _analyzer's path.
If not found or _analyzer's path is null, try analyzer set on type level.

Closes #8757
@masaruh masaruh closed this as completed May 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Search/Highlighting How a query matched a document
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants