lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Khludnev (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LUCENE-7827) disable "textgrams" when minPrefixChars=0 AnalyzingInfixSuggester
Date Wed, 23 Aug 2017 17:07:00 GMT

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

Mikhail Khludnev updated LUCENE-7827:
-------------------------------------
    Attachment: LUCENE-7827.patch

Leaving only relevant changes in [^LUCENE-7827.patch] 

> 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
>         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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message