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

frange / ValueSourceRangeFilter / FunctionValues.getRangeScorer should not match documents w/o a value

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.6, 6.0
    • Component/s: None
    • Labels:
      None

      Description

      {!frange}

      currently can match documents w/o a value (because of a default value of 0).
      This only existed historically because we didn't have info about what fields had a value for numerics, and didn't have exists() on FunctionValues.

      1. SOLR-8867.patch
        6 kB
        Yonik Seeley
      2. SOLR-8867.patch
        22 kB
        Yonik Seeley

        Issue Links

          Activity

          Hide
          ichattopadhyaya Ishan Chattopadhyaya added a comment -

          Yonik, do you think you'll be able to get to this in time for 6.0? I can take a look in case there are other issues you're caught up with.

          Show
          ichattopadhyaya Ishan Chattopadhyaya added a comment - Yonik, do you think you'll be able to get to this in time for 6.0? I can take a look in case there are other issues you're caught up with.
          Hide
          yseeley@gmail.com Yonik Seeley added a comment -

          Here's an untested patch... current tests are running now, still needs new tests for coverage.

          Show
          yseeley@gmail.com Yonik Seeley added a comment - Here's an untested patch... current tests are running now, still needs new tests for coverage.
          Hide
          yseeley@gmail.com Yonik Seeley added a comment -

          Here's an updated patch that modifies a random range test to include docs w/o a value in the field and also queries across negative values.

          This also changes getRangeScorer() to use LeafReaderContext to be consistent with everything else.

          All tests pass, and I plan on committing shortly.

          Show
          yseeley@gmail.com Yonik Seeley added a comment - Here's an updated patch that modifies a random range test to include docs w/o a value in the field and also queries across negative values. This also changes getRangeScorer() to use LeafReaderContext to be consistent with everything else. All tests pass, and I plan on committing shortly.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 5ea86b14c36bc38366888a208368ac241d254baf in lucene-solr's branch refs/heads/master from Yonik Seeley
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=5ea86b1 ]

          SOLR-8867: fix frange/FunctionValues.getRangeScorer to not match missing values, getRangeScorer refactored to take LeafReaderContext

          Show
          jira-bot ASF subversion and git services added a comment - Commit 5ea86b14c36bc38366888a208368ac241d254baf in lucene-solr's branch refs/heads/master from Yonik Seeley [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=5ea86b1 ] SOLR-8867 : fix frange/FunctionValues.getRangeScorer to not match missing values, getRangeScorer refactored to take LeafReaderContext
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit c195395d34fb28711b99e4552602dcea729a718b in lucene-solr's branch refs/heads/branch_6x from Yonik Seeley
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=c195395 ]

          SOLR-8867: fix frange/FunctionValues.getRangeScorer to not match missing values, getRangeScorer refactored to take LeafReaderContext

          Show
          jira-bot ASF subversion and git services added a comment - Commit c195395d34fb28711b99e4552602dcea729a718b in lucene-solr's branch refs/heads/branch_6x from Yonik Seeley [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=c195395 ] SOLR-8867 : fix frange/FunctionValues.getRangeScorer to not match missing values, getRangeScorer refactored to take LeafReaderContext
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit ce0ba5cab99c9ae9da2f25fd7c73f9116fe17a5a in lucene-solr's branch refs/heads/branch_6_0 from Yonik Seeley
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=ce0ba5c ]

          SOLR-8867: fix frange/FunctionValues.getRangeScorer to not match missing values, getRangeScorer refactored to take LeafReaderContext

          Show
          jira-bot ASF subversion and git services added a comment - Commit ce0ba5cab99c9ae9da2f25fd7c73f9116fe17a5a in lucene-solr's branch refs/heads/branch_6_0 from Yonik Seeley [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=ce0ba5c ] SOLR-8867 : fix frange/FunctionValues.getRangeScorer to not match missing values, getRangeScorer refactored to take LeafReaderContext
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 5ea86b14c36bc38366888a208368ac241d254baf in lucene-solr's branch refs/heads/apiv2 from Yonik Seeley
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=5ea86b1 ]

          SOLR-8867: fix frange/FunctionValues.getRangeScorer to not match missing values, getRangeScorer refactored to take LeafReaderContext

          Show
          jira-bot ASF subversion and git services added a comment - Commit 5ea86b14c36bc38366888a208368ac241d254baf in lucene-solr's branch refs/heads/apiv2 from Yonik Seeley [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=5ea86b1 ] SOLR-8867 : fix frange/FunctionValues.getRangeScorer to not match missing values, getRangeScorer refactored to take LeafReaderContext
          Hide
          anshumg Anshum Gupta added a comment -

          Yonik Seeley : Should this one also go back into 5x ?

          Show
          anshumg Anshum Gupta added a comment - Yonik Seeley : Should this one also go back into 5x ?
          Hide
          yseeley@gmail.com Yonik Seeley added a comment -

          Should this one also go back into 5x ?

          It's a judgement call... it's certainly more of a bug to most people, but it's also a limitation that someone could have been relying on.

          Show
          yseeley@gmail.com Yonik Seeley added a comment - Should this one also go back into 5x ? It's a judgement call... it's certainly more of a bug to most people, but it's also a limitation that someone could have been relying on.
          Hide
          anshumg Anshum Gupta added a comment -

          In that case I think I'll back port it to 5x but leave it out of 5.5.1 to avoid any behavior changes. That way it would be released with 5.6.

          Show
          anshumg Anshum Gupta added a comment - In that case I think I'll back port it to 5x but leave it out of 5.5.1 to avoid any behavior changes. That way it would be released with 5.6.
          Hide
          anshumg Anshum Gupta added a comment -

          Reopening to back port to 5x.

          Show
          anshumg Anshum Gupta added a comment - Reopening to back port to 5x.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 3f49fd7adb47a935585de41287e237bb49e473b8 in lucene-solr's branch refs/heads/branch_5x from Yonik Seeley
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=3f49fd7 ]

          SOLR-8867: fix frange/FunctionValues.getRangeScorer to not match missing values, getRangeScorer refactored to take LeafReaderContext

          Show
          jira-bot ASF subversion and git services added a comment - Commit 3f49fd7adb47a935585de41287e237bb49e473b8 in lucene-solr's branch refs/heads/branch_5x from Yonik Seeley [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=3f49fd7 ] SOLR-8867 : fix frange/FunctionValues.getRangeScorer to not match missing values, getRangeScorer refactored to take LeafReaderContext
          Hide
          ctargett Cassandra Targett added a comment -

          Seems from the comments this can be closed. Please reopen if I'm mistaken on that.

          Show
          ctargett Cassandra Targett added a comment - Seems from the comments this can be closed. Please reopen if I'm mistaken on that.

            People

            • Assignee:
              yseeley@gmail.com Yonik Seeley
              Reporter:
              yseeley@gmail.com Yonik Seeley
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development