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

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

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1
    • 2.9.2, 3.0.1, 4.0-ALPHA
    • core/search
    • None
    • 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

            uschindler Uwe Schindler
            mikemccand Michael McCandless
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: