Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-6202

Simplify the use of "rq" for query re-ranking

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      It seems like there is some really easy tweaks we could make to the "rq" (Re-Ranking Query) API to make it less verbose and easier to use:

      • in QueryComponent
        • when parsing "rq", we should use "rerank" as the default parser
          • should be a trivial change to the QParser.getParser when initializin rqparser
      • in ReRankQParserPlugin
        • we should deprecate/remove the "reRankQuery" local param and just use "v"
          • this is the implicit param created when using the body of the query string, or it can be explicit (to refer to variables)
        • we should leverage subQuery() (just like NestedQParser does) so that "defType" is respected when parsing the wrapped query

      Unless i'm overlooking something, the combination of these simple changes should drastically simplify a lot of use cases...

      BEFORE: rq={!rerank reRankQuery=$rqq}rqq=XXX
       AFTER: rq=XXX
      
      BEFORE: rq={!rerank reRankQuery=$rqq reRankDocs=200}$rqq={!func}XXX
       AFTER: rq={!reRankDocs=200 defType=func}XXX
      

      Attachments

        1. SOLR-6202.patch
          24 kB
          Maciej Zasada

        Issue Links

          Activity

            People

              Unassigned Unassigned
              hossman Chris M. Hostetter
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: