romseygeek commented on issue #581: LUCENE-3041: QueryVisitor
URL: https://github.com/apache/lucene-solr/pull/581#issuecomment-466937586
 
 
   I made a couple more changes:
   * Rather than having a `NO_OP` visitor, I changed the contract so that 
`getSubVisitor()` returns `null` if queries should not continue visiting.  This 
enables us to shortcut traversal, for example if we're checking for the 
presence of a particular query type in a tree then we can stop as soon as we've 
found a single instance.  I also added a method to `QueryUtils` to check that 
queries do the right thing when `getSubVisitor()` returns `null`.
   * I added a `matchesAutomaton` method back in, and refactored 
`MultiTermHighlighting` in the unified highlighter to use it - it's much 
cleaner and easier to follow now, and makes it much easier to handle custom 
queries.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to