Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-14509

SOLR Search - differentiate equal scoring results by date

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • None
    • 9.5.1
    • Search - Solr
    • None
    • Win 10, XWiki 9.5.1
    • Unknown

    Description

      When pages inside the wiki have the same scoring in solr, the date is not seen as a differentiator so that the most recent results appear on top.

      1. Create a page abc
      2. Wait for a couple of minutes
      3. Create another page abc in another location
      4. Perform a search with abc as term and with the debugger in place
        http://localhost:8080/xwiki/bin/view/Main/Search?text=abc&f_type=DOCUMENT&f_locale=en&f_locale=&r=1&debug=true
        

      You will see the listed results, with the most recent created below the older one. Their scores are equal as seen here:

      • Main abc
        37.50109 = max of:
          0.13647377 = weight(spaces:abc in 13) [SchemaSimilarity], result of:
            0.13647377 = score(doc=13,freq=1.0 = termFreq=1.0
        ), product of:
              0.016 = boost
              7.780052 = idf, computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from:
                2.0 = docFreq
                5980.0 = docCount
              1.0963436 = tfNorm, computed as (freq * (k1 + 1)) / (freq + k1 * (1 - b + b * fieldLength / avgFieldLength)) from:
                1.0 = termFreq=1.0
                1.2 = parameter k1
                0.75 = parameter b
                1.2735786 = avgFieldLength
                1.0 = fieldLength
          37.50109 = max of:
            37.50109 = weight(title_en:abc in 13) [SchemaSimilarity], result of:
              37.50109 = score(doc=13,freq=1.0 = termFreq=1.0
        ), product of:
                10.0 = boost
                3.346389 = idf, computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from:
                  2.0 = docFreq
                  70.0 = docCount
                1.1206435 = tfNorm, computed as (freq * (k1 + 1)) / (freq + k1 * (1 - b + b * fieldLength / avgFieldLength)) from:
                  1.0 = termFreq=1.0
                  1.2 = parameter k1
                  0.75 = parameter b
                  1.3571428 = avgFieldLength
                  1.0 = fieldLength
        

      ----------------------

      • Sandbox abc
        37.50109 = max of:
          0.08808337 = weight(spaces:abc in 1) [SchemaSimilarity], result of:
            0.08808337 = score(doc=1,freq=1.0 = termFreq=1.0
        ), product of:
              0.016 = boost
              7.780052 = idf, computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from:
                2.0 = docFreq
                5980.0 = docCount
              0.70760584 = tfNorm, computed as (freq * (k1 + 1)) / (freq + k1 * (1 - b + b * fieldLength / avgFieldLength)) from:
                1.0 = termFreq=1.0
                1.2 = parameter k1
                0.75 = parameter b
                1.2735786 = avgFieldLength
                2.56 = fieldLength
          37.50109 = max of:
            37.50109 = weight(title_en:abc in 1) [SchemaSimilarity], result of:
              37.50109 = score(doc=1,freq=1.0 = termFreq=1.0
        ), product of:
                10.0 = boost
                3.346389 = idf, computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from:
                  2.0 = docFreq
                  70.0 = docCount
                1.1206435 = tfNorm, computed as (freq * (k1 + 1)) / (freq + k1 * (1 - b + b * fieldLength / avgFieldLength)) from:
                  1.0 = termFreq=1.0
                  1.2 = parameter k1
                  0.75 = parameter b
                  1.3571428 = avgFieldLength
                  1.0 = fieldLength
        

      Equal scoring is a rare case in the standard search, however on simplified versions which look (for eg) just in document titles, this situation may occur often.

      Attachments

        Activity

          People

            Unassigned Unassigned
            iinsuratelu Iustin Insuratelu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: