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

Add hl.maxMultiValuedToExamine to limit the number of multiValued entries examined while highlighting



    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.3, 6.0
    • Fix Version/s: 4.3, 6.0
    • Component/s: highlighter
    • Labels:


      I'm looking at an admittedly pathological case of many, many entries in a multiValued field, and trying to implement a way to limit the number examined, analogous to maxAnalyzedChars, see the patch.

      Along the way, I noticed that we do what looks like unnecessary copying of the fields to be examined. We call Document.getFields, which copies all of the fields and values to the returned array. Then we copy all of those to another array, converting them to Strings. Then we actually examine them. a> this doesn't seem very efficient and b> reduces the benefit from limiting the number of mv values examined.

      So the attached does two things:
      1> attempts to fix this
      2> implements hl.maxMultiValuedToExamine

      I'd really love it if someone who knows the highlighting code takes a peek at the fix to see if I've messed things up, the changes are actually pretty minimal.


        1. SOLR-4656.patch
          5 kB
          Erick Erickson
        2. SOLR-4656-trunk.patch
          14 kB
          Erick Erickson
        3. SOLR-4656-4x.patch
          14 kB
          Erick Erickson
        4. SOLR-4656-4x.patch
          13 kB
          Erick Erickson

          Issue Links



              • Assignee:
                erickerickson Erick Erickson
                erickerickson Erick Erickson
              • Votes:
                0 Vote for this issue
                2 Start watching this issue


                • Created: