[ https://issues.apache.org/jira/browse/LUCENE-7827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16139061#comment-16139061 ]
ASF subversion and git services commented on LUCENE-7827: --------------------------------------------------------- Commit b896b8f5d3496d2bf70cb46610a11bfd3048d972 in lucene-solr's branch refs/heads/branch_7x from [~mkhludnev] [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=b896b8f ] 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-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org