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

Highlight query parameter (hl.q) does not honor QParser defType parameter

    XMLWordPrintableJSON

    Details

      Description

      If one uses a custom QParser for parsing standard queries, that person cannot do the same with the highlight query parameter using the 'defType' parameter.

      The hl.q QParser will always default to the default defType unless the local params syntax is used to specify a different QParser.

      The typical expectation would be that q and hl.q would behave the same.

      The following examples should highlight the document in the same way:

      q=field:text&hl=true&defType=custom
      
      q=id:123&hl=true&hl.q=field:text&defType=custom
      

      This is how you have to do it now:

      q=field:text&hl=true&defType=custom
      
      q=id:123&hl=true&hl.q={!custom}field:text&defType=custom
      

        Attachments

        1. SOLR-4410.patch
          4 kB
          Scott Smerchek

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                smerchek Scott Smerchek
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: