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

add hl.q parameter

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.4
    • Fix Version/s: 3.5, 4.0-ALPHA
    • Component/s: highlighter
    • Labels:
      None

      Description

      If hl.q parameter is set, HighlightComponent uses it rather than q.

      Use case:

      You search "PC" with highlight and facet capability:

      q=PC
      &facet=on&facet.field=maker&facet.field=something
      &hl=on&hl.fl=desc
      

      You get a lot of results with snippets (term "PC" highlighted in desc field). Then you click a link "maker:DELL(50)" to narrow the result:

      q=PC
      &facet=on&facet.field=something
      &fq=maker:DELL
      &hl=on&hl.fl=desc
      

      You'll get narrowed result with term "PC" highlighted snippets. But, sometimes I'd like to see "DELL" to be highlighted as well, because I clicked "DELL". In this case, hl.q can be used:

      q=PC
      &facet=on&facet.field=something
      &fq=maker:DELL
      &hl=on&hl.fl=desc&*hl.q=PC+maker:DELL*
      

      Note that hl.requireFieldMatch should be false (false is default) in this scenario.

        Attachments

        1. SOLR-1926.patch
          5 kB
          Koji Sekiguchi
        2. SOLR-1926.patch
          5 kB
          Koji Sekiguchi
        3. SOLR-1926.patch
          7 kB
          Koji Sekiguchi
        4. SOLR-1926.patch
          5 kB
          Koji Sekiguchi
        5. SOLR-1926.patch
          2 kB
          Koji Sekiguchi

        Issue Links

          Activity

            People

            • Assignee:
              koji Koji Sekiguchi
              Reporter:
              koji Koji Sekiguchi

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment