romseygeek commented on a change in pull request #1042: LUCENE-9068: Build 
FuzzyQuery automata up-front
URL: https://github.com/apache/lucene-solr/pull/1042#discussion_r362775154
 
 

 ##########
 File path: lucene/core/src/java/org/apache/lucene/search/FuzzyTermsEnum.java
 ##########
 @@ -344,67 +363,4 @@ public BytesRef term() throws IOException {
     return actualEnum.term();
   }
 
-  /**
-   * reuses compiled automata across different segments,
-   * because they are independent of the index
-   * @lucene.internal */
-  public static interface LevenshteinAutomataAttribute extends Attribute {
-    public CompiledAutomaton[] automata();
-    public void setAutomata(CompiledAutomaton[] automata);
-  }
-    
-  /** 
-   * Stores compiled automata as a list (indexed by edit distance)
-   * @lucene.internal */
-  public static final class LevenshteinAutomataAttributeImpl extends 
AttributeImpl implements LevenshteinAutomataAttribute {
-    private CompiledAutomaton[] automata;
-      
-    @Override
-    public CompiledAutomaton[] automata() {
-      return automata;
-    }
-
-    @Override
-    public void setAutomata(CompiledAutomaton[] automata) {
-      this.automata = automata;
-    }
-
-    @Override
-    public void clear() {
-      automata = null;
-    }
-
-    @Override
-    public int hashCode() {
-      if (automata == null) {
-        return 0;
-      } else {
-        return automata.hashCode();
-      }
-    }
-
-    @Override
-    public boolean equals(Object other) {
-      if (this == other)
-        return true;
-      if (!(other instanceof LevenshteinAutomataAttributeImpl))
-        return false;
-      return Arrays.equals(automata, ((LevenshteinAutomataAttributeImpl) 
other).automata);
 
 Review comment:
   fixed

----------------------------------------------------------------
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


With regards,
Apache Git Services

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

Reply via email to