-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
:Search/SearchSearch-related issues that do not fall into other categoriesSearch-related issues that do not fall into other categories>bug
Description
The span multi term query limits the number of expanded terms to search only if the inner multi term query uses top_terms_N rewrite. Otherwise it extracts all terms that match the inner multi term query and use them to build a giant span_or query without any limit.
We should force the inner multi term query to use a top_terms_N rewrite in order to limit the memory. Currently a prefix query like a* would extract all term that starts with a since the default rewrite of the prefix query is constant_score. This mode is optimized for prefix query and should never be used on a span_multi which needs to access all positions for the extracted terms.
nirmalc
Metadata
Metadata
Assignees
Labels
:Search/SearchSearch-related issues that do not fall into other categoriesSearch-related issues that do not fall into other categories>bug