Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-7071

PostingsHighlighter, Highlighter and SimpleExcerptProvider return all different formats for excerpts

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.6.7, 1.8.0
    • None
    • lucene

    Description

      PostingsHighligher returns for example

      [my text with any <b>highlighting</b> followed by more text]

      because the PostingsHighligher itself returns for each field a String[] of phrases limited by the beforehand given max phrases. This String[] is the transformed to String using Arrays.toString() at LucenePropertyIndex.java#L688 causing the value to be wrapped in square brackets.

      Highlighter returns

      my text with any <strong>highlighting</strong> followed by more text

      SimpleExcerptProvider returns

      <div><span>my text with any <strong>highlighting</strong> followed by more text</span></div>

      As the PostingsHighligher cannot get any custom prefix or suffix, I would suggest set <b></b> as default for the others as well to prevent any further text transformation post extracting the excerpts.

      Attachments

        Activity

          People

            Unassigned Unassigned
            diru Dirk Rudolph
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: