Solr
  1. Solr
  2. SOLR-6916

Option to use payloads with default highlighter

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.0, 6.0
    • Component/s: highlighter
    • Labels:
      None

      Description

      MemoryIndex can now store payloads (LUCENE-6155), and there's a corresponding boolean flag setter on QueryScorer (used by the default highlighter). We should add a parameter to toggle this. It will only take effect if hl.usePhraseHighlighter=true and the source of the tokens comes from re-analysis. This settings is ignored if the tokens come from term vectors which support payloads already (in Lucene/Solr 5) provided they are there.

      I suggest naming this boolean parameter hl.payloads.

      1. SOLR-6916.patch
        7 kB
        David Smiley

        Issue Links

          Activity

          Hide
          David Smiley added a comment -

          Alternatively... always enable and the cost is one integer per term position in MemoryIndex. Arguably if you have tons of text (and hence positions) you should be using term vectors which doesn't use MemoryIndex for highlighting? I dunno.

          Show
          David Smiley added a comment - Alternatively... always enable and the cost is one integer per term position in MemoryIndex. Arguably if you have tons of text (and hence positions) you should be using term vectors which doesn't use MemoryIndex for highlighting? I dunno.
          Hide
          David Smiley added a comment - - edited

          It'd be nice to auto-detect the existence of payloads and enable based on that... hmmmm, how about choosing the default via this?:
          request.getSearcher().getLeafReader().getFieldInfos().fieldInfo(fieldName).hasPayloads();

          Show
          David Smiley added a comment - - edited It'd be nice to auto-detect the existence of payloads and enable based on that... hmmmm, how about choosing the default via this?: request.getSearcher().getLeafReader().getFieldInfos().fieldInfo(fieldName).hasPayloads();
          Hide
          David Smiley added a comment -

          The attached patch adds hl.payloads and its default setting is determined by the presence of indexed payloads using the aforementioned technique.

          Testing was annoying because there's no QParser for this so I tested the Highlighting component at a lower level, allowing me to supply a SpanPayloadCheckQuery directly.

          I'll commit this Monday, subject to feedback.

          Show
          David Smiley added a comment - The attached patch adds hl.payloads and its default setting is determined by the presence of indexed payloads using the aforementioned technique. Testing was annoying because there's no QParser for this so I tested the Highlighting component at a lower level, allowing me to supply a SpanPayloadCheckQuery directly. I'll commit this Monday, subject to feedback.
          Hide
          ASF subversion and git services added a comment -

          Commit 1651076 from David Smiley in branch 'dev/trunk'
          [ https://svn.apache.org/r1651076 ]

          SOLR-6916: hl.payloads

          Show
          ASF subversion and git services added a comment - Commit 1651076 from David Smiley in branch 'dev/trunk' [ https://svn.apache.org/r1651076 ] SOLR-6916 : hl.payloads
          Hide
          ASF subversion and git services added a comment -

          Commit 1651079 from David Smiley in branch 'dev/branches/branch_5x'
          [ https://svn.apache.org/r1651079 ]

          SOLR-6916: hl.payloads

          Show
          ASF subversion and git services added a comment - Commit 1651079 from David Smiley in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1651079 ] SOLR-6916 : hl.payloads
          Hide
          Anshum Gupta added a comment -

          Bulk close after 5.0 release.

          Show
          Anshum Gupta added a comment - Bulk close after 5.0 release.

            People

            • Assignee:
              David Smiley
              Reporter:
              David Smiley
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development