Lucene - Core
  1. Lucene - Core
  2. LUCENE-1019

CustomScoreQuery should support multiple ValueSourceQueries

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.3
    • Component/s: core/search
    • Labels:
      None
    • Lucene Fields:
      Patch Available

      Description

      CustomScoreQuery's constructor currently accepts a subQuery, and a ValueSourceQuery. I would like it to accept multiple ValueSourceQueries. The workaround of nested CustomScoreQueries works for simple cases, but it quickly becomes either cumbersome to manage, or impossible to implement the desired function.

      This patch implements CustomMultiScoreQuery with my desired functionality, and refactors CustomScoreQuery to implement the special case of a CustomMultiScoreQuery with 0 or 1 ValueSourceQueries. This keeps the CustomScoreQuery API intact.

      This patch includes basic tests, more or less taken from the original implementation, and customized a bit to cover the new cases.

      1. lucene-1019-multi-vsq.patch
        25 kB
        Doron Cohen
      2. CustomScoreQuery.v1.diff
        13 kB
        Kyle Maxwell
      3. CustomMultiQuery.v0.diff
        37 kB
        Kyle Maxwell

        Issue Links

          Activity

          Kyle Maxwell created issue -
          Kyle Maxwell made changes -
          Field Original Value New Value
          Attachment CustomMultiQuery.v0.diff [ 12367122 ]
          Kyle Maxwell made changes -
          Attachment CustomScoreQuery.v1.diff [ 12367164 ]
          Kyle Maxwell made changes -
          Resolution Invalid [ 6 ]
          Lucene Fields [Patch Available, New]
          Status Open [ 1 ] Closed [ 6 ]
          Kyle Maxwell made changes -
          Lucene Fields [New, Patch Available]
          Resolution Invalid [ 6 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          Doron Cohen made changes -
          Assignee Doron Cohen [ doronc ]
          Doron Cohen made changes -
          Attachment lucene-1019-multi-vsq.patch [ 12371017 ]
          Doron Cohen made changes -
          Fix Version/s 2.3 [ 12312531 ]
          Lucene Fields [Patch Available, New] [Patch Available]
          Priority Major [ 3 ] Minor [ 4 ]
          Doron Cohen made changes -
          Link This issue relates to LUCENE-1085 [ LUCENE-1085 ]
          Doron Cohen made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Michael Busch made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Mark Thomas made changes -
          Workflow jira [ 12414358 ] Default workflow, editable Closed status [ 12562198 ]
          Mark Thomas made changes -
          Workflow Default workflow, editable Closed status [ 12562198 ] jira [ 12584720 ]

            People

            • Assignee:
              Doron Cohen
              Reporter:
              Kyle Maxwell
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development