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

Multivalue field that is boosted on indexing time has wrong norm.

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 4.10, 5.0, 5.1
    • 5.2, 6.0
    • None
    • None

    Description

      Multivalue field has wrong norm when the field value is tokenized, the field or document is boosted, and the field is not source of copyField.

      $ java -jar start.jar &
      
      $ echo '{
      "add": {
        "doc": {
          "id":"no-boosted",
          "features": ["a","b","c"],
          "dyn_not_copied_txt": ["a","b","c"]
        }
      },
      "add": {
        "boost": 10,
        "doc": {
          "id":"boosted",
          "features": ["a","b","c"],
          "dyn_not_copied_txt": ["a","b","c"]
        }
      }}' > test.json
      
      $ curl 'http://localhost:8983/solr/update/json?commit=true' -H 'Content-type:application/json' --data-binary @test.json
      {"responseHeader":{"status":0,"QTime":41}}
      
      $ curl 'http://localhost:8983/solr/select' -d 'omitHeader=true&wt=json&indent=on&q=*:*&fl=id,norm(features),norm(dyn_not_copied_txt)'
      {
        "response":{"numFound":2,"start":0,"docs":[
            {
              "id":"no-boosted",
              "norm(features)":0.5,
              "norm(dyn_not_copied_txt)":0.5},
            {
              "id":"boosted",
              "norm(features)":5.0,
              "norm(dyn_not_copied_txt)":512.0}]
        }}
      

      In the above example, "features" is source of copyField. On the other hand, "dyn_not_copied_txt" is not so.

      "features" and "dyn_not_copied_txt" have the same type attribute (type="text_general"), the same values ( ["a","b","c"] ) and the same boost. So, both fields must have the same norm in the document.

      But, in boosted document only, the field that is not copied have too larger norm.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            hossman Chris M. Hostetter
            sasashin Shingo Sasaki
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment