Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-7865

lookup method implemented in BlendedInfixLookupFactory does not respect suggest.count

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.2.1
    • 5.4.1, 5.5, 6.0
    • Suggester
    • None

    Description

      The following test failes in the TestBlendedInfixSuggestions.java:

      This is mainly because

      num * numFactor

      get called multiple times from
      https://github.com/apache/lucene-solr/blob/trunk/solr/core/src/java/org/apache/solr/spelling/suggest/fst/BlendedInfixLookupFactory.java#L118

      The test is expecting count=1 but we get all 3 docs out.

        public void testSuggestCount() {
          assertQ(req("qt", URI, "q", "the", SuggesterParams.SUGGEST_COUNT, "1", SuggesterParams.SUGGEST_DICT, "blended_infix_suggest_linear"),
              "//lst[@name='suggest']/lst[@name='blended_infix_suggest_linear']/lst[@name='the']/int[@name='numFound'][.='1']"
          );
        }
      

      Attachments

        1. LUCENE_7865.patch
          7 kB
          Arcadius Ahouansou

        Issue Links

          Activity

            People

              mikemccand Michael McCandless
              arcadius Arcadius Ahouansou
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: