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

lookup method implemented in BlendedInfixLookupFactory does not respect suggest.count

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.2.1
    • Fix Version/s: 5.4.1, 5.5, 6.0
    • Component/s: Suggester
    • Labels:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: