- Affected version
- 2.2.3
ElasticSearch exposes a "max clauses" (under a bunch of names) which indicates how many search terms can be used.
XenForo applies this to the search keywords as-is, the trouble is this doesn't capture that
And I'm positive how Elasticsearch counts these things varies depending on version.
This is noticeable in one of my addons (ElasticSearch Essentials) which optionally injects ".exact" variants of message/title to allow stop-words/stemming to be used and also exact matches to be preferred.
Maybe the only sane thing is to check's elasticsearch error message for
XenForo applies this to the search keywords as-is, the trouble is this doesn't capture that
simple_query_string
decomposes to a number of search clauses based on the fields being searched. ie "max clauses" reports 1024, but XenForo searches "message" and "title" means the max keywords is much lower. Facets search (ie allowed forums, by user list, etc) also count to the "max clauses" count.And I'm positive how Elasticsearch counts these things varies depending on version.
This is noticeable in one of my addons (ElasticSearch Essentials) which optionally injects ".exact" variants of message/title to allow stop-words/stemming to be used and also exact matches to be preferred.
Maybe the only sane thing is to check's elasticsearch error message for
too_many_clauses
and if so, reporting the search has too many clauses?