0

In Solr, I have several multivalue fields configured, but whenever I query them using highlighting, I get back a single result, instead of a list.

For example, here's my query:

hl=true&
hl.preserveMulti=true&

f.school.hl.alternateField=school&
f.school.hl.fragListBuilder=single&

fl=id,absolute_urlg&
hl.fl=school&

q=university&
start=0&
rows=20&
sort=score+desc&

School is a multiValue field configured like so:

<field name="school"
        type="text_en_splitting"
        indexed="true"
        stored="true"
        multiValued="true"
        termVectors="true"
        termPositions="true"
        termOffsets="true"/>

For one document in my collection, school has the value:

[University of California, 
 Villanova University, 
 Pitzer College]

The result I want when somebody searches for "University" as they did above is:

["<mark>University</mark> of California", 
 "Villanova <mark>University</mark>", 
 "Pitzer College"]

But instead I get:

<mark>University</mark> of California Villanova <mark>University</mark>

Is there something I'm missing? Somehow I'm not getting back a list of results, and values in the multiValue field that don't match aren't being returned.

mlissner
  • 17,359
  • 18
  • 106
  • 169
  • Which version of Solr are you using? This seems to work as you expect with Solr 5.3.1. Are you using the standard highlighter or another highlighting component? – Matt Pearce Apr 07 '16 at 10:53
  • I'm using fastvectorhighlighter on 4.1? – mlissner Apr 07 '16 at 10:54
  • Looks like this is a known issue with the fastvectorhighlighter - see https://issues.apache.org/jira/browse/SOLR-2998. If you can use the standard highlighting component, I'd recommend that instead. – Matt Pearce Apr 07 '16 at 11:36

0 Answers0