-
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
Throw error when all_fields mode queries over a certain number of fields #25105
Comments
We discussed this, and decided that we should add the same limit that BooleanQuery has to the DisjuntionMaxQuery - that is, a limit of 1024 clauses. Additionally, we should document that the |
@dakrone, Could there also be a way to restrict which fields are included in an "all_fields" query? I have over 1400 fields in an index and I've been planning on removing the _all field to reduce memory usage. But this restriction will prevent easily searching without specifying a set of field names. I'd be fine with determining which fields shouldn't be used in "all_fields" to reduce the number below <1024 but I don't want to use copy_to since that is basically the same thing as using the _all field and the memory usage won't be reduced. |
You could use the |
@trevan @dakrone I would vote for restricting fields in the "all_query". A multi_match or other queries would expect, that clients know which fields are available and should be searched by default. In many cases this is a configuration on the index and shouldn't be known by the client. |
@mr-mos sure, please do open an issue so we can discuss it! |
…string This limits the number of automatically expanded fields for the "all fields" mode (`"default_field": "*"`) for the `query_string` and `simple_query_string` queries to 1024 fields. Resolves elastic#25105
…string (#26541) * Limit the number of expanded fields it query_string and simple_query_string This limits the number of automatically expanded fields for the "all fields" mode (`"default_field": "*"`) for the `query_string` and `simple_query_string` queries to 1024 fields. Resolves #25105 * Add blurb about limit to the docs
The automatic expansion of fields to query on for the
query_string
andsimple_query_string
queries has been found to have some performance issues for users with a large numbers of fields. See: elastic/kibana#12097Should we limit the number of fields the auto-expansion is limited to, throwing an error if a query searches more than that many fields? If so, what should the limit be? @jimczi mentioned 100 fields in the original issue as perhaps a good starting point.
The text was updated successfully, but these errors were encountered: