Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Exception: TokenStream implementation classes or at least their incrementToken() implementation must be final #1397

Closed
cpesch opened this Issue · 3 comments

2 participants

@cpesch

Sorry, I'm not able to provide a curl reproducer. What I did was to index System.currentTimeInMillis() in a test and then query for it. And I get this stack trace:

Exception in thread "elasticsearch[search]-pool-199-thread-5" java.lang.AssertionError: TokenStream implementation classes or at least their incrementToken() implementation must be final
at org.apache.lucene.analysis.TokenStream.assertFinal(TokenStream.java:117)
at org.apache.lucene.analysis.TokenStream.(TokenStream.java:100)
at org.apache.lucene.analysis.Tokenizer.(Tokenizer.java:58)
at org.elasticsearch.index.analysis.NumericTokenizer.(NumericTokenizer.java:45)
at org.elasticsearch.index.analysis.NumericLongTokenizer.(NumericLongTokenizer.java:37)
at org.elasticsearch.index.analysis.NumericLongAnalyzer.createNumericTokenizer(NumericLongAnalyzer.java:43)
at org.elasticsearch.index.analysis.NumericLongAnalyzer.createNumericTokenizer(NumericLongAnalyzer.java:30)
at org.elasticsearch.index.analysis.NumericAnalyzer.reusableTokenStream(NumericAnalyzer.java:45)
at org.elasticsearch.index.analysis.NamedAnalyzer.reusableTokenStream(NamedAnalyzer.java:81)
at org.elasticsearch.index.mapper.MapperService$SmartIndexNameSearchAnalyzer.reusableTokenStream(MapperService.java:696)
at org.apache.lucene.search.FuzzyLikeThisQuery.addTerms(FuzzyLikeThisQuery.java:187)
at org.apache.lucene.search.FuzzyLikeThisQuery.rewrite(FuzzyLikeThisQuery.java:264)
at org.apache.lucene.search.IndexSearcher.rewrite(IndexSearcher.java:589)
at org.elasticsearch.search.internal.ContextIndexSearcher.rewrite(ContextIndexSearcher.java:125)
at org.apache.lucene.search.Searcher.createNormalizedWeight(Searcher.java:167)
at org.apache.lucene.search.IndexSearcher.createNormalizedWeight(IndexSearcher.java:661)
at org.elasticsearch.search.internal.ContextIndexSearcher.createNormalizedWeight(ContextIndexSearcher.java:138)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:298)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:286)
at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:217)
at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:234)
at org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteQuery(SearchServiceTransportAction.java:134)
at org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.sendExecuteFirstPhase(TransportSearchQueryThenFetchAction.java:80)
at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:204)
at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:191)
at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$2.run(TransportSearchTypeAction.java:177)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

@cpesch

version is 0.17.8

@cpesch

maybe I shouldn't have used

  builder = fuzzyLikeThisQuery(name).likeText(value).prefixLength(PREFIX_LENGTH).minSimilarity(MIN_SIMILARITY);

on a long - but the error message could be nicer

@kimchy
Owner

Yea, fuzzy does not mean much on a numeric field, but, I will fix the problem

@kimchy kimchy closed this issue from a commit
@kimchy kimchy Exception: TokenStream implementation classes or at least their incre…
…mentToken() implementation must be final, closes #1397.
dee4b42
@kimchy kimchy closed this in dee4b42
@dadoonet dadoonet referenced this issue from a commit in dadoonet/elasticsearch
@kimchy kimchy Exception: TokenStream implementation classes or at least their incre…
…mentToken() implementation must be final, closes #1397.
bb2ffc6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.