-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Optimize phrase_prefix
match query
#31921
Comments
Pinging @elastic/es-search-aggs |
That makes sense to me. The search for
This bit I don't get. The phrase_prefix docs already include a warning that the To solve that problem shouldn't this issue be about using the |
When prefixes are not indexed we extract the first 50 terms that match the prefix by default. With indexed prefixes we can match all documents that contain the prefix with a single term which ensures that all documents that should match will be taken into account. We could also use a mix of |
Ah OK. so the phrase(/span/interval) query we run has a the full term (eg |
This change adds a way to customize how phrase prefix queries should be created on field types. The match phrase prefix query is exposed in field types in order to allow optimizations based on the options set on the field. For instance the text field uses the configured prefix field (if available) to build a span near that mixes the original field and the prefix field on the last position. This change also contains a small refactoring of the match/multi_match query that simplifies the interactions between the builders. Closes elastic#31921
This change adds a way to customize how phrase prefix queries should be created on field types. The match phrase prefix query is exposed in field types in order to allow optimizations based on the options set on the field. For instance the text field uses the configured prefix field (if available) to build a span near that mixes the original field and the prefix field on the last position. This change also contains a small refactoring of the match/multi_match query that simplifies the interactions between the builders. Closes elastic#31921
This change adds a way to customize how phrase prefix queries should be created on field types. The match phrase prefix query is exposed in field types in order to allow optimizations based on the options set on the field. For instance the text field uses the configured prefix field (if available) to build a span near that mixes the original field and the prefix field on the last position. This change also contains a small refactoring of the match/multi_match query that simplifies the interactions between the builders. Closes #31921
This change adds a way to customize how phrase prefix queries should be created on field types. The match phrase prefix query is exposed in field types in order to allow optimizations based on the options set on the field. For instance the text field uses the configured prefix field (if available) to build a span near that mixes the original field and the prefix field on the last position. This change also contains a small refactoring of the match/multi_match query that simplifies the interactions between the builders. Closes #31921
We can leverage #28290 to optimize
phrase_prefix
onmatch
query. If theindex_prefix
option is set on the field we can query the last term using theprefix
field, this should speed up the query significantly (a single term query) and increase the recall since all expansions would match.The text was updated successfully, but these errors were encountered: