[ 
https://issues.apache.org/jira/browse/LUCENE-7827?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mikhail Khludnev resolved LUCENE-7827.
--------------------------------------
       Resolution: Fixed
    Fix Version/s: 7.1
                   master (8.0)

> disable "textgrams" when minPrefixChars=0 AnalyzingInfixSuggester 
> ------------------------------------------------------------------
>
>                 Key: LUCENE-7827
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7827
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Mikhail Khludnev
>            Priority: Minor
>             Fix For: master (8.0), 7.1
>
>         Attachments: LUCENE-7827.patch, LUCENE-7827.patch, LUCENE-7827.patch, 
> LUCENE-7827.patch, LUCENE-7827.patch
>
>
> The current code allows to set minPrefixChars=0, but it creates an 
> unnecessary {{textgrams}} field, and might bring significant footprint.  
> Bypassing it keeps existing tests green.
> {code}
>         if (fieldName.equals("textgrams") && minPrefixChars > 0) {
>           TokenFilter filter = new 
> EdgeNGramTokenFilter(components.getTokenStream(), 1, minPrefixChars);
>           return new TokenStreamComponents(components.getTokenizer(), filter);
>         } else {
>           return components; // threre is no sense to go here if 
> minPrefixChars==0 and fieldName=="textgrams"
>         }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to