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

SchemaSimilarityFactory should delegate queryNorm and coord to the default similarity

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:
      None

      Description

      This is a follow-up to the discussion with Upayavira on LUCENE-6590: SchemaSimilarityFactory can easily build similarities that apply the idf twice.

      1. SOLR-9315.patch
        0.9 kB
        Adrien Grand

        Issue Links

          Activity

          Hide
          jpountz Adrien Grand added a comment -

          Here is a proposed change that delegates coord and queryNorm to the default similarity. It is still not perfect since you would still have the issue eg. if the base similarity does not normalize (eg. BM25) and a per-field similarity uses query normalization (ClassicSimilarity), but it should work better in most cases? I have not tested the patch.

          Show
          jpountz Adrien Grand added a comment - Here is a proposed change that delegates coord and queryNorm to the default similarity. It is still not perfect since you would still have the issue eg. if the base similarity does not normalize (eg. BM25) and a per-field similarity uses query normalization (ClassicSimilarity), but it should work better in most cases? I have not tested the patch.
          Hide
          jpountz Adrien Grand added a comment -

          This is only relevant to the 6.x branch since coord and queryNorm are gone from master.

          Show
          jpountz Adrien Grand added a comment - This is only relevant to the 6.x branch since coord and queryNorm are gone from master.
          Hide
          upayavira Upayavira added a comment -

          This patch did resolve my issue. How should we go about committing it?

          I'm happy to commit it, but I wouldn't know how to provide a test for it.

          Show
          upayavira Upayavira added a comment - This patch did resolve my issue. How should we go about committing it? I'm happy to commit it, but I wouldn't know how to provide a test for it.
          Hide
          thetaphi Uwe Schindler added a comment -

          I think this should be done in Lucene, not Solr. The problem exists there, too.

          I agree, for the coord factor its no longer needed in master. Is queryNorm also gone in master?

          Show
          thetaphi Uwe Schindler added a comment - I think this should be done in Lucene, not Solr. The problem exists there, too. I agree, for the coord factor its no longer needed in master. Is queryNorm also gone in master?
          Hide
          jpountz Adrien Grand added a comment -

          Yes Uwe, both queryNorm and coords are gone in master.

          Show
          jpountz Adrien Grand added a comment - Yes Uwe, both queryNorm and coords are gone in master.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 22d24969f5b148a78684482592c63e6f976fae6c in lucene-solr's branch refs/heads/branch_6x from Uwe Schindler
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=22d2496 ]

          LUCENE-7395, SOLR-9315: Fix PerFieldSimilarityWrapper to also delegate query norm and coordination factor using a default similarity added as ctor param

          Show
          jira-bot ASF subversion and git services added a comment - Commit 22d24969f5b148a78684482592c63e6f976fae6c in lucene-solr's branch refs/heads/branch_6x from Uwe Schindler [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=22d2496 ] LUCENE-7395 , SOLR-9315 : Fix PerFieldSimilarityWrapper to also delegate query norm and coordination factor using a default similarity added as ctor param

            People

            • Assignee:
              Unassigned
              Reporter:
              jpountz Adrien Grand
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development