Skip to content

Unmapped fields are taken into account when checking the limit of full text query #49002

Closed
@jimczi

Description

@jimczi

Today we have a limit in full-text query to limit the number of field expansion that we allow. The limit is controllable with the indices.query.bool.max_clause_count setting and we count all fields including unmapped ones. However for queries that target multiple indices it is possible that the list of field to expand the query to become bigger than the max clause setting even if the list of applicable field per index/shard is small. So for instance a query with 2000 fields where 1000 fields belong to one index and the other 1000 belong to the other index would fail because the total is greater than the max clause count. It is also important to note that we currently translate any unmapped field into a MatchNoDocsQuery to ease debugging but we could also completely ignore these unmapped fields if we wanted. I am opening this issue mainly to discuss this behavior and to assess whether it would be beneficial to only count the fields that will make a difference (the mapped ones).

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Search/SearchSearch-related issues that do not fall into other categorieshelp wantedadoptme

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions