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

CustomScoreQuery should support arbitrary Queries

Details

    • New Feature
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • core/query/scoring
    • None
    • 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. LUCENE-1608.patch
          11 kB
          Doron Cohen
        2. CustomScoreQueryWithSubqueries.java
          47 kB
          Fernando Wasylyszyn

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated: