javanna commented on issue #14756: URL: https://github.com/apache/lucene/issues/14756#issuecomment-3031555727
@romseygeek I vaguely remember chatting about this problem, and possible solutions. We don't know when doing the counting which of the query variants will be used. Yet it seems wrong to sum up all boolean clauses from all the variants, at least for the purpose of limiting the max number of boolean clauses. Visitors are a very generic mechanism, and for the purpose of visiting, we should visit all variants, like `IndexOrDocvaluesQuery` does. `IndexSearcher#getNumClausesCheckVisitor` provides a specific query visitor to count the number of clauses, which we could customize, but `IndexOrDocValuesQuery` does not visit itself, hence it is difficult to adjust the counting for the sub-queries, as we don't have enough context in the visitor? We could though return a custom visitor from `getSubVisitor(BooleanClause.Occur occur, Query parent)` that has special logic depending on the parent query? What logic would that be? I was thinking of taking the max number of clauses out of the different query variants. Other opinions? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org