Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-7827

disable "textgrams" when minPrefixChars=0 AnalyzingInfixSuggester

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.1, 8.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      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.

              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"
              }
      

        Attachments

        1. LUCENE-7827.patch
          0.9 kB
          Mikhail Khludnev
        2. LUCENE-7827.patch
          3 kB
          Mikhail Khludnev
        3. LUCENE-7827.patch
          5 kB
          Mikhail Khludnev
        4. LUCENE-7827.patch
          5 kB
          Mikhail Khludnev
        5. LUCENE-7827.patch
          3 kB
          Mikhail Khludnev

        Issue Links

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mkhl Mikhail Khludnev

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment