lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-7827) disable "textgrams" when minPrefixChars=0 AnalyzingInfixSuggester
Date Wed, 23 Aug 2017 20:35:00 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-7827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16139036#comment-16139036
] 

ASF subversion and git services commented on LUCENE-7827:
---------------------------------------------------------

Commit 7760b356458e6e71d94b055d23a1095b22b8460b in lucene-solr's branch refs/heads/master
from [~mkhludnev]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=7760b35 ]

LUCENE-7827: AnalysingInfixSuggester omits textgrams when
minPrefixChars=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
>         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