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

          Steven Bethard created issue -
          Mike Klaas made changes -
          Field Original Value New Value
          Link This issue is related to LUCENE-850 [ LUCENE-850 ]
          Doron Cohen made changes -
          Assignee Doron Cohen [ doronc ]
          Doron Cohen made changes -
          Attachment LUCENE-1608.patch [ 12406169 ]
          Fernando Wasylyszyn made changes -
          Attachment CustomScoreQueryWithSubqueries.java [ 12470750 ]
          Mark Thomas made changes -
          Workflow jira [ 12461388 ] Default workflow, editable Closed status [ 12563258 ]
          Mark Thomas made changes -
          Workflow Default workflow, editable Closed status [ 12563258 ] jira [ 12584346 ]

            People

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

              Dates

              • Created:
                Updated:

                Development