org.elasticsearch.index.query.QueryParsingException: [merchant_sea] Failed to parse
at org.elasticsearch.index.query.IndexQueryParserService.parseQuery(IndexQueryParserService.java:370)
at org.elasticsearch.action.count.TransportCountAction.shardOperation(TransportCountAction.java:187)
at org.elasticsearch.action.count.CrateTransportCountAction.shardOperation(CrateTransportCountAction.java:119)
at org.elasticsearch.action.count.CrateTransportCountAction.shardOperation(CrateTransportCountAction.java:49)
at org.elasticsearch.action.support.broadcast.TransportBroadcastOperationAction$AsyncBroadcastAction$1.run(TransportBroadcastOperationAction.java:171)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.lucene.util.automaton.TooComplexToDeterminizeException: Determinizing automaton would result in more than 10000 states.
at org.apache.lucene.util.automaton.Operations.determinize(Operations.java:743)
at org.apache.lucene.util.automaton.RunAutomaton.<init>(RunAutomaton.java:138)
at org.apache.lucene.util.automaton.ByteRunAutomaton.<init>(ByteRunAutomaton.java:32)
at org.apache.lucene.util.automaton.CompiledAutomaton.<init>(CompiledAutomaton.java:203)
at org.apache.lucene.search.AutomatonQuery.<init>(AutomatonQuery.java:84)
at org.apache.lucene.search.AutomatonQuery.<init>(AutomatonQuery.java:65)
at org.apache.lucene.search.WildcardQuery.<init>(WildcardQuery.java:57)
at org.elasticsearch.index.query.WildcardQueryParser.parse(WildcardQueryParser.java:106)
at org.elasticsearch.index.query.QueryParseContext.parseInnerQuery(QueryParseContext.java:281)
at org.elasticsearch.index.query.BoolQueryParser.parse(BoolQueryParser.java:93)
at org.elasticsearch.index.query.QueryParseContext.parseInnerQuery(QueryParseContext.java:281)
at org.elasticsearch.index.query.BoolQueryParser.parse(BoolQueryParser.java:93)
at org.elasticsearch.index.query.QueryParseContext.parseInnerQuery(QueryParseContext.java:281)
at org.elasticsearch.index.query.BoolQueryParser.parse(BoolQueryParser.java:93)
at org.elasticsearch.index.query.QueryParseContext.parseInnerQuery(QueryParseContext.java:281)
at org.elasticsearch.index.query.BoolQueryParser.parse(BoolQueryParser.java:93)
at org.elasticsearch.index.query.QueryParseContext.parseInnerQuery(QueryParseContext.java:281)
at org.elasticsearch.index.query.BoolQueryParser.parse(BoolQueryParser.java:93)
at org.elasticsearch.index.query.QueryParseContext.parseInnerQuery(QueryParseContext.java:281)
at org.elasticsearch.index.query.IndexQueryParserService.innerParse(IndexQueryParserService.java:382)
at org.elasticsearch.index.query.IndexQueryParserService.parse(IndexQueryParserService.java:281)
at org.elasticsearch.index.query.IndexQueryParserService.parse(IndexQueryParserService.java:276)
at org.elasticsearch.index.query.IndexQueryParserService.parseQuery(IndexQueryParserService.java:354)
... 7 more
/** 匹配字符串 */
public static final char WILDCARD_STRING = '*';
/** 匹配单个字符 */
public static final char WILDCARD_CHAR = '?';
/** 转义符 */
public static final char WILDCARD_ESCAPE = '\\';
public AutomatonQuery(final Term term, Automaton automaton) {
this(term, automaton, Operations.DEFAULT_MAX_DETERMINIZED_STATES);
}
/**
* Create a new AutomatonQuery from an {@link Automaton}.
*
* @param term Term containing field and possibly some pattern structure. The
* term text is ignored.
* @param automaton Automaton to run, terms that are accepted are considered a
* match.
* @param maxDeterminizedStates maximum number of states in the resulting
* automata. If the automata would need more than this many states
* TooComplextToDeterminizeException is thrown. Higher number require more
* space but can process more complex automata.
*/
public AutomatonQuery(final Term term, Automaton automaton, int maxDeterminizedStates) {
super(term.field());
this.term = term;
this.automaton = automaton;
this.compiled = new CompiledAutomaton(automaton, null, true, maxDeterminizedStates);
}
final public class Operations {
/**
* Default maximum number of states that {@link Operations#determinize} should create.
*/
public static final int DEFAULT_MAX_DETERMINIZED_STATES = 10000;
...
}