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

hl.queryFieldPattern support (advanced alternative to hl.requireFieldMatch)

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 9.1, main (10.0)
    • highlighter
    • None

    Description

      Use case: a search referencing multiple fields and highlighting is required for one of the fields: q=fieldA:one OR fieldB:two OR fieldC:three hl.fl=fieldA

      • hl.requireFieldMatch=true can be used if highlighting of the terms ("two", "three") from the fieldB and fieldC is a problem.
      • hl.q=fieldA:one OR fieldB:two can be used if highlighting of the fieldB term is good but fieldC terms are a problem.

      New feature: hl.queryFieldPattern=fieldA,fieldB as an alternative to hl.q=fieldA:one OR fieldB:two e.g. if obtaining hl.q from q poses complexity.

      There's already a TODO comment present in the code regarding this: https://github.com/apache/lucene-solr/blob/releases/lucene-solr/8.11.1/solr/core/src/java/org/apache/solr/highlight/UnifiedSolrHighlighter.java#L418

      // TODO define hl.queryFieldPattern as a more advanced alternative to hl.requireFieldMatch.
      

      Attachments

        Issue Links

          Activity

            People

              cpoerschke Christine Poerschke
              cpoerschke Christine Poerschke
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3h 20m
                  3h 20m