-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Add a limit for graph phrase query expansion #34061
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
Conversation
Backport of elastic#34031 for 5.6.
Pinging @elastic/es-search-aggs |
… expansion of graph phrase query (defaults to unlimited)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@colings86 , as discussed with Jason yesterday I added a JVM option named es.query.apply_graph_phrase_limit
to activate the limit in this version. By default it is deactivated and the only valid value for the JVM option is true
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jimczi I left two comment on user feddback but otherwise I think this change is good
core/src/main/java/org/apache/lucene/queryparser/classic/MapperQueryParser.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a super minor comment but this LGTM, thanks @jimczi
@@ -889,11 +888,12 @@ protected SpanQuery analyzeGraphPhrase(TokenStream source, String field, int phr | |||
* The JVM option can only be set to <code>true</code> (false is the default value), any other value | |||
* will throw an {@link IllegalArgumentException}. | |||
*/ | |||
// public for tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this isn't just public for tests now that SearchModule
calls it?
Backport of #34031 for 5.6.