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
ElasticSearch 0.90 fails when "highlight" contains a field of type "long" #3211
Comments
thanks for opening this issue! We will look into it soon |
@Quecksilber Thanks for the detailed steps, I could reproduce the problem. Can you confirm that with 0.20 you didn't expect the numbers to be highlighted even if they were part of the query? (0.20 doesn't look able to do so) |
@jpountz I didn't expect the numbers to be highlighted in the query. To |
NumericTokenizer is a simple wrapper aroung a NumericTokenStream. However, its implementations had a few issues: its reset() method was not idempotent, causing exceptions if reset() was called twice (causing elastic#3211) and it had no attributes, meaning that the only thing it allowed to do is counting the number of generated tokens. The reason why indexing numeric data worked is that the mapper's parseCreateField directly generates a NumericTokenStream and by-passes the analyzer. This commit makes NumericTokenizer.reset idempotent and makes consuming a NumericTokenizer behave the same way as consuming the underlying NumericTokenStream.
I discussed this issue with Simon and we decided to make the behavior match 0.20: highlighting numeric terms is not supported but doesn't raise errors. |
Thanks :) On Fri, Jun 21, 2013 at 4:36 PM, Adrien Grand notifications@github.comwrote:
|
+1 |
NumericTokenizer is a simple wrapper aroung a NumericTokenStream. However, its implementations had a few issues: its reset() method was not idempotent, causing exceptions if reset() was called twice (causing #3211) and it had no attributes, meaning that the only thing it allowed to do is counting the number of generated tokens. The reason why indexing numeric data worked is that the mapper's parseCreateField directly generates a NumericTokenStream and by-passes the analyzer. This commit makes NumericTokenizer.reset idempotent and makes consuming a NumericTokenizer behave the same way as consuming the underlying NumericTokenStream.
NumericTokenizer is a simple wrapper aroung a NumericTokenStream. However, its implementations had a few issues: its reset() method was not idempotent, causing exceptions if reset() was called twice (causing #3211) and it had no attributes, meaning that the only thing it allowed to do is counting the number of generated tokens. The reason why indexing numeric data worked is that the mapper's parseCreateField directly generates a NumericTokenStream and by-passes the analyzer. This commit makes NumericTokenizer.reset idempotent and makes consuming a NumericTokenizer behave the same way as consuming the underlying NumericTokenStream.
Awesome! Thanks! |
NumericTokenizer is a simple wrapper aroung a NumericTokenStream. However, its implementations had a few issues: its reset() method was not idempotent, causing exceptions if reset() was called twice (causing elastic#3211) and it had no attributes, meaning that the only thing it allowed to do is counting the number of generated tokens. The reason why indexing numeric data worked is that the mapper's parseCreateField directly generates a NumericTokenStream and by-passes the analyzer. This commit makes NumericTokenizer.reset idempotent and makes consuming a NumericTokenizer behave the same way as consuming the underlying NumericTokenStream.
If the "highlight" section of a searh query contains a field of type "long", an error occurs. That didn't happen with the old version.
This is a sample script I used to test this behaviour:
If you run it against an elasticsearch 0.20.6 server, it returns the two hits, correctly highlighted.
However, if you run it against an elasticsearch 0.90 server, this happens:
The text was updated successfully, but these errors were encountered: