uschindler commented on PR #12135: URL: https://github.com/apache/lucene/pull/12135#issuecomment-1425779002
> I see this as a feature, not a bug. As you can see, left unchecked, "database functionality" can be quite invasive on the codebase. The separate query is of course fine, the problem is only that child nodes of the IndexOrDocavlauesQuery may have an expensive ctor (like the one popuplating PrefixCodedTerms). Basically if all would be in MTQ rewrite this could be handled. If we keep IndexOrDocvaluesQuery we would need to make the soring and PrefixCodedTerms lazy. A good idea would be to make the ctor arguments of IndexOrDocvaluesQuery lazy (producers or functions) and the actual rewrite will create the subqueries. But this would break equals and hashcode, as IndexOrDocavluesQuery relies on the hashcode and equals of the childs. Because of this MTQ would be much better. The MTQ instance knows everything for equals/hashcode and the rewritten form is lazily created. -- 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