Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-2190

CustomScoreQuery (function query) is broken (due to per-segment searching)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 2.9.2, 3.0.1, 4.0-ALPHA
    • Component/s: core/search
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      Spinoff from here:

      http://lucene.markmail.org/message/psw2m3adzibaixbq

      With the cutover to per-segment searching, CustomScoreQuery is not really usable anymore, because the per-doc custom scoring method (customScore) receives a per-segment docID, yet there is no way to figure out which segment you are currently searching.

      I think to fix this we must also notify the subclass whenever a new segment is switched to. I think if we copy Collector.setNextReader, that would be sufficient. It would by default do nothing in CustomScoreQuery, but a subclass could override.

        Attachments

        1. LUCENE-2190.patch
          11 kB
          Michael McCandless
        2. LUCENE-2190-2.patch
          32 kB
          Uwe Schindler
        3. LUCENE-2190-2.patch
          32 kB
          Uwe Schindler
        4. LUCENE-2190-2-branch29.patch
          28 kB
          Uwe Schindler
        5. LUCENE-2190-2-branch30.patch
          34 kB
          Uwe Schindler
        6. LUCENE-2190-2-branch30.patch
          33 kB
          Uwe Schindler
        7. LUCENE-2190-2-trunk.patch
          32 kB
          Uwe Schindler
        8. LUCENE-2190-2-trunk.patch
          32 kB
          Uwe Schindler

          Activity

            People

            • Assignee:
              thetaphi Uwe Schindler
              Reporter:
              mikemccand Michael McCandless
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: