dweiss commented on pull request #634: URL: https://github.com/apache/lucene/pull/634#issuecomment-1028125846
> Specifying this intent (e.g. syntax) is a necessary prerequisite to doing this optimization for SHOULD clauses! I agree with you but I can't convince myself to add yet another syntax extension to that query parser, it is already pretty complex. I looked at optimizing just the filtering expressions but this would have to be done at the graph level (not query builder level) because by the time the node builder tries to optimize the subclause, it's already thrown an exception (boolean query builder is eager). Finally I've just modified the code so that this is an optional feature which has to be explicitly turned on. This really works fine in practice (based on what I've seen) because if the number of boolean clauses is in hundreds then scores from these filtering subexpressions are typically secondary - not too important given the goal of the entire query. Let me know if this optional feature is acceptable for you. If not, I'll just leave it as a patch for anybody who wants to reuse it - the query parser's default boolean node builder can be replaced in custom applications so this is not a problem. -- 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