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

PostingsSolrHighlighter produces strange highlight results

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: highlighter
    • Labels:
      None

      Description

      If hl.fl contains commas and whitespaces, e.g. hl.fl=title, content, the PostingsSolrHighlighter produces the following result:

        "highlighting": {
          "mydoc1": {
            "title": [],
            "": [],
            "content": [
              "my highlighted content. "
            ]
          },
          "mydoc2": {
            "title": [],
            "": [],
            "content": [
              "my highlighted content 2. "
            ]
          }
        },
      

      Two things:

      • The space followed by the comma leads to an empty field (or even a bunch in case of longer field list).
      • Why is "title": [], included in the response (though hl.defaultSummary is not set)?

      Tested with Solr 4.10.2.

        Attachments

        1. SOLR-6782.patch
          0.7 kB
          Simon Endele

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                simon.endele Simon Endele
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: