lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romseygeek <...@git.apache.org>
Subject [GitHub] lucene-solr pull request #460: LUCENE-8497: refactor multi-term analysis han...
Date Mon, 01 Oct 2018 08:10:37 GMT
Github user romseygeek commented on a diff in the pull request:

    https://github.com/apache/lucene-solr/pull/460#discussion_r221522467
  
    --- Diff: lucene/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/ASCIIFoldingFilterFactory.java
---
    @@ -56,18 +53,13 @@ public ASCIIFoldingFilter create(TokenStream input) {
       }
     
       @Override
    -  public AbstractAnalysisFactory getMultiTermComponent() {
    -    if (preserveOriginal) {
    -      // The main use-case for using preserveOriginal is to match regardless of
    -      // case but to give better scores to exact matches. Since most multi-term
    -      // queries return constant scores anyway, the multi-term component only
    -      // emits the folded token
    -      Map<String, String> args = new HashMap<>(getOriginalArgs());
    -      args.remove(PRESERVE_ORIGINAL);
    -      return new ASCIIFoldingFilterFactory(args);
    -    } else {
    -      return this;
    -    }
    +  public ASCIIFoldingFilter normalize(TokenStream input) {
    --- End diff --
    
    The return signature here can just be `TokenStream`, I think?


---

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


Mime
View raw message