romseygeek opened a new pull request #1465: URL: https://github.com/apache/lucene-solr/pull/1465
TermInSetQuery currently iterates through all its prefix-encoded terms in order to build an array to pass back to its visitor when visit() is called. This seems like a waste, particularly when the visitor is not actually consuming the terms (for example, when doing a clause-count check before executing a search). This commit changes TermInSetQuery to use consumeTermsMatching(), and also changes the signature of this method so that it takes a BytesRunAutomaton supplier to allow for lazy instantiation. In addition, IndexSearcher's clause count check wasn't counting leaves that called consumeTermsMatching(). ---------------------------------------------------------------- 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. 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