[
https://issues.apache.org/jira/browse/LUCENE-8811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16852882#comment-16852882
]
Alan Woodward commented on LUCENE-8811:
---------------------------------------
You'd need to count calls to visitLeaf() and collectTerms(), and it wouldn't be
exact because of things like MultiPhraseQuery which treats itself as a
combination of phrases and disjunctions, but I like the idea. Setting the
maximum permissible query size to be per-searcher rather than global on BQ
would also be very nice, as you could do things like restrict the complexity of
queries over particular indexes or for particular users.
> Add maximum clause count check to IndexSearcher rather than BooleanQuery
> ------------------------------------------------------------------------
>
> Key: LUCENE-8811
> URL: https://issues.apache.org/jira/browse/LUCENE-8811
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Adrien Grand
> Priority: Minor
> Attachments: LUCENE-8811.patch
>
>
> Currently we only check whether boolean queries have too many clauses.
> However there are other ways that queries may have too many clauses, for
> instance if you have boolean queries that have themselves inner boolean
> queries.
> Could we use the new Query visitor API to move this check from BooleanQuery
> to IndexSearcher in order to make this check more consistent across queries?
> See for instance LUCENE-8810 where a rewrite rule caused the maximum clause
> count to be hit even though the total number of leaf queries remained the
> same.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]