Solr
  1. Solr
  2. SOLR-7865

lookup method implemented in BlendedInfixLookupFactory does not respect suggest.count

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major 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']"
          );
        }
      
      1. LUCENE_7865.patch
        7 kB
        Arcadius Ahouansou

        Issue Links

          Activity

          Hide
          Arcadius Ahouansou added a comment -

          Seems to be introduced by LUCENE-6004

          Show
          Arcadius Ahouansou added a comment - Seems to be introduced by LUCENE-6004
          Hide
          jmlucjav added a comment -
          Show
          jmlucjav added a comment - I already saw this in 5.2: http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201506.mbox/%3CCAN4YXvfUQMMsSS=1w+dZpXskezwXfRgtCObrdKSOavjjYwAwCg@mail.gmail.com%3E but in the end did not have the time to dig deeper.
          Hide
          Arcadius Ahouansou added a comment -

          num * numFactor was being applied too many times in all loockup() methods.
          This operation needs to be applied only once i.e. in the common lookup() called by all others.

          Michael McCandless, please help review this ...

          Thank you very much.

          Show
          Arcadius Ahouansou added a comment - num * numFactor was being applied too many times in all loockup() methods. This operation needs to be applied only once i.e. in the common lookup() called by all others. Michael McCandless , please help review this ... Thank you very much.
          Hide
          Michael McCandless added a comment -

          Thanks Arcadius Ahouansou, your patch looks great! I'll run tests and commit shortly...

          Show
          Michael McCandless added a comment - Thanks Arcadius Ahouansou , your patch looks great! I'll run tests and commit shortly...
          Hide
          ASF subversion and git services added a comment -

          Commit 1720831 from Michael McCandless in branch 'dev/branches/branch_5x'
          [ https://svn.apache.org/r1720831 ]

          SOLR-7865: BlendedInfixSuggester was returning more results than requested

          Show
          ASF subversion and git services added a comment - Commit 1720831 from Michael McCandless in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1720831 ] SOLR-7865 : BlendedInfixSuggester was returning more results than requested
          Hide
          ASF subversion and git services added a comment -

          Commit 1720832 from Michael McCandless in branch 'dev/trunk'
          [ https://svn.apache.org/r1720832 ]

          SOLR-7865: BlendedInfixSuggester was returning more results than requested

          Show
          ASF subversion and git services added a comment - Commit 1720832 from Michael McCandless in branch 'dev/trunk' [ https://svn.apache.org/r1720832 ] SOLR-7865 : BlendedInfixSuggester was returning more results than requested
          Hide
          Arcadius Ahouansou added a comment -

          Thank you very much Michael McCandless for your valuable help!

          Show
          Arcadius Ahouansou added a comment - Thank you very much Michael McCandless for your valuable help!
          Hide
          ASF subversion and git services added a comment -

          Commit 1722823 from Anshum Gupta in branch 'dev/branches/lucene_solr_5_3'
          [ https://svn.apache.org/r1722823 ]

          SOLR-7865: BlendedInfixSuggester was returning too many results (merge from branch_5x for 5.3.2 release)

          Show
          ASF subversion and git services added a comment - Commit 1722823 from Anshum Gupta in branch 'dev/branches/lucene_solr_5_3' [ https://svn.apache.org/r1722823 ] SOLR-7865 : BlendedInfixSuggester was returning too many results (merge from branch_5x for 5.3.2 release)
          Hide
          ASF subversion and git services added a comment -

          Commit 1722825 from Anshum Gupta in branch 'dev/trunk'
          [ https://svn.apache.org/r1722825 ]

          SOLR-7865: Adding change log entry for 5.3.2 release

          Show
          ASF subversion and git services added a comment - Commit 1722825 from Anshum Gupta in branch 'dev/trunk' [ https://svn.apache.org/r1722825 ] SOLR-7865 : Adding change log entry for 5.3.2 release
          Hide
          ASF subversion and git services added a comment -

          Commit 1722826 from Anshum Gupta in branch 'dev/branches/branch_5x'
          [ https://svn.apache.org/r1722826 ]

          SOLR-7865: Adding change log entry for 5.3.2 release(merge from trunk)

          Show
          ASF subversion and git services added a comment - Commit 1722826 from Anshum Gupta in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1722826 ] SOLR-7865 : Adding change log entry for 5.3.2 release(merge from trunk)
          Hide
          Michael McCandless added a comment -

          I'll backport this to 5.4.1.

          Show
          Michael McCandless added a comment - I'll backport this to 5.4.1.
          Hide
          ASF subversion and git services added a comment -

          Commit 1724040 from Michael McCandless in branch 'dev/branches/lucene_solr_5_4'
          [ https://svn.apache.org/r1724040 ]

          SOLR-7865: BlendedInfixSuggester was returning more results than requested

          Show
          ASF subversion and git services added a comment - Commit 1724040 from Michael McCandless in branch 'dev/branches/lucene_solr_5_4' [ https://svn.apache.org/r1724040 ] SOLR-7865 : BlendedInfixSuggester was returning more results than requested
          Hide
          ASF subversion and git services added a comment -

          Commit 1724072 from Adrien Grand in branch 'dev/trunk'
          [ https://svn.apache.org/r1724072 ]

          SOLR-7865: Move CHANGES entry to 5.4.1.

          Show
          ASF subversion and git services added a comment - Commit 1724072 from Adrien Grand in branch 'dev/trunk' [ https://svn.apache.org/r1724072 ] SOLR-7865 : Move CHANGES entry to 5.4.1.
          Hide
          ASF subversion and git services added a comment -

          Commit 1724073 from Adrien Grand in branch 'dev/branches/branch_5x'
          [ https://svn.apache.org/r1724073 ]

          SOLR-7865 : Move CHANGES entry to 5.4.1.

          Show
          ASF subversion and git services added a comment - Commit 1724073 from Adrien Grand in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1724073 ] SOLR-7865 : Move CHANGES entry to 5.4.1.

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development