Slow Wildcard searches are prioritized in Bool queries

Hi,

we are dynamically generating bool queries that sometimes include wildcard searches. I understood that the execution order of bool queries is depending on term frequencies, document frequencies and other metrics. Problem is that depending on the search fields the wildcard queries are first in the execution order. This leads to really slow execution times, although it would be possible to filter most of the document out before executing the wildcard query.

Is there any possibility to adapt this execution order so that the wildcard queries are executed last or at least after the term queries oder does someone has another suggestion to handle this problem?

Also it is interesting that sometimes there is a difference in execution order between a term query and a terms query with the same input (so only one and the same element in the terms query). Is there a reason for that?

Thanks in advance.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.