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

CustomScoreQuery should support arbitrary Queries

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core/query/scoring
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      CustomScoreQuery only allows the secondary queries to be of type ValueSourceQuery instead of allowing them to be any type of Query. As a result, what you can do with CustomScoreQuery is pretty limited.

      It would be nice to extend CustomScoreQuery to allow arbitrary Query objects. Most of the code should stay about the same, though a little more care would need to be taken in CustomScorer.score() to use 0.0 when the sub-scorer does not produce a score for the current document.

        Attachments

        1. CustomScoreQueryWithSubqueries.java
          47 kB
          Fernando Wasylyszyn
        2. LUCENE-1608.patch
          11 kB
          Doron Cohen

          Issue Links

            Activity

              People

              • Assignee:
                doronc Doron Cohen
                Reporter:
                steven.bethard Steven Bethard
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: