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

UnifiedHighlighter: simplify "maxPassages" input API

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • 7.0
    • modules/highlighter
    • None
    • New

    Description

      The "maxPassages" input to the UnifiedHighlighter can be provided as an array to some of the public methods on UnifiedHighlighter. When it's provided as an array, the index in the array is for the field in a parallel array. I think this is awkward and furthermore it's inconsistent with the way this highlighter customizes things on a by field basis. Instead, the parameter can be a simple int default (not an array), and then there can be a protected method like getMaxPassageCount(String field that returns an Integer which, when non-null, replaces the default value for this field.

      Aside from API simplicity and consistency, this will also remove some annoying parallel array sorting going on.

      Attachments

        Activity

          People

            Unassigned Unassigned
            dsmiley David Smiley
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: