Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-4860

PostingsHighlighter should pass field name to PassageFormatter.format?

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.3, 6.0
    • None
    • None
    • New

    Description

      If the app needs to render different fields (eg multi-valued vs single-valued) differently it's tricky now.

      You can do Passage[0].getMatchTerms()[0].field(), but then that doesn't work if that field hit the empty highlight.

      I think we should pass the fieldName to format directly? And then maybe change getMatchTerms() to return BytesRef[] instead (the field name is redundant: they are all the same for all passages passed to format).

      Attachments

        1. LUCENE-4860.patch
          10 kB
          Michael McCandless
        2. LUCENE-4860.patch
          15 kB
          Michael McCandless
        3. LUCENE-4860.patch
          15 kB
          Michael McCandless
        4. LUCENE-4860.patch
          16 kB
          Michael McCandless

        Activity

          People

            mikemccand Michael McCandless
            mikemccand Michael McCandless
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: