lucene-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [lucene-solr] romseygeek commented on a change in pull request #1037: LUCENE-9062: QueryVisitor.consumeTermsMatching
Date Mon, 25 Nov 2019 12:01:20 GMT
romseygeek commented on a change in pull request #1037: LUCENE-9062: QueryVisitor.consumeTermsMatching
URL: https://github.com/apache/lucene-solr/pull/1037#discussion_r350142799
 
 

 ##########
 File path: lucene/core/src/java/org/apache/lucene/search/FuzzyQuery.java
 ##########
 @@ -156,9 +159,14 @@ public Automaton toAutomaton() {
 
   @Override
   public void visit(QueryVisitor visitor) {
-    // TODO find some way of consuming Automata
-    if (visitor.acceptField(term.field())) {
-      visitor.visitLeaf(this);
+    if (visitor.acceptField(field)) {
+      if (maxEdits == 0 || prefixLength >= term.text().length()) {
+        visitor.consumeTerms(this, term);
+      } else {
+        CompiledAutomaton a = new CompiledAutomaton(toAutomaton(), null, true,
 
 Review comment:
   It is, which is why I'm still not convinced this is the correct API.  Our whole setup around
automata and utf8 vs utf32 is confusing and hard to use unfortunately

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Mime
View raw message