Solr
  1. Solr
  2. SOLR-5858

Specify highlight query parameter outside of localparams

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 4.7, 6.0
    • Fix Version/s: 4.8
    • Component/s: None
    • Labels:
      None

      Description

      A separate highlight query provided by the hl.q parameter will always use the lucene query parser unless a separate parser is explicitly provided as a localparam. This is mildly annoying if you're using a hand-rolled query parser. This patch adds a new hl.qparser parameter that allows you to specify a query parser outside of localparams, and will fall back to using the overall query defType if hl.qparser is not passed.

      Patch also fixes a bug in edismax and dismax query parsers whereby they couldn't be used for highlight queries because they weren't properly set up until parse() is called, and HighlightComponent doesn't do that.

      1. SOLR-5858.patch
        11 kB
        Alan Woodward
      2. SOLR-5858.patch
        10 kB
        Alan Woodward

        Issue Links

          Activity

          Hide
          Alan Woodward added a comment -

          Patch also includes a test for SOLR-4812, which is fixed by this JIRA. I'll commit tomorrow.

          Show
          Alan Woodward added a comment - Patch also includes a test for SOLR-4812 , which is fixed by this JIRA. I'll commit tomorrow.
          Hide
          ASF subversion and git services added a comment -

          Commit 1578800 from Alan Woodward in branch 'dev/trunk'
          [ https://svn.apache.org/r1578800 ]

          SOLR-5858, SOLR-4812: Allow queryparser to be defined for highlight query, and edismax and dismax to be used for this purpose

          Show
          ASF subversion and git services added a comment - Commit 1578800 from Alan Woodward in branch 'dev/trunk' [ https://svn.apache.org/r1578800 ] SOLR-5858 , SOLR-4812 : Allow queryparser to be defined for highlight query, and edismax and dismax to be used for this purpose
          Hide
          ASF subversion and git services added a comment -

          Commit 1578801 from Alan Woodward in branch 'dev/branches/branch_4x'
          [ https://svn.apache.org/r1578801 ]

          SOLR-5858, SOLR-4812: Allow queryparser to be defined for highlight query, and edismax and dismax to be used for this purpose

          Show
          ASF subversion and git services added a comment - Commit 1578801 from Alan Woodward in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1578801 ] SOLR-5858 , SOLR-4812 : Allow queryparser to be defined for highlight query, and edismax and dismax to be used for this purpose
          Hide
          Uwe Schindler added a comment -

          Close issue after release of 4.8.0

          Show
          Uwe Schindler added a comment - Close issue after release of 4.8.0

            People

            • Assignee:
              Alan Woodward
              Reporter:
              Alan Woodward
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development