Lucene - Core
  1. Lucene - Core
  2. LUCENE-1608

CustomScoreQuery should support arbitrary Queries

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Minor 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.

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

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

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

              Dates

              • Created:
                Updated:

                Development