If I have a multi-valued field with the following data
autoCompleteContainsCastActor: [
John Cena
Brian J White
Travis Davis
Brian DeCaro
Peter Navy Tuiasosopo
Kyle Clements
Nick Gomez
Aidan Gillen
Steve Harris
Gonzalo Menendez
Taylor Cole
Rosalind Rubin
Ashley Scott
]
And I choose to highlight this field in my search for "gomez"
I get 1 fragment whose value is this:
Nick <em>Gomez</em> Aidan Gillen Steve Harris Gonzalo Menendez
Taylor Cole Rosalind Rubin Ashley Scott
I'm not changing any defaults with fragment size or number of
fragments.
So why am I getting back the whole field and not just one entry for
"Nick Gomez"?
I suspect your creating your index like this, where your passing in
one field of people, this text is all analyzed and parsed into terms.
{
"someobject" : {
"people" : "John Cena Brian J White Travis Davis"
}
If I have a multi-valued field with the following data
autoCompleteContainsCastActor: [
John Cena
Brian J White
Travis Davis
Brian DeCaro
Peter Navy Tuiasosopo
Kyle Clements
Nick Gomez
Aidan Gillen
Steve Harris
Gonzalo Menendez
Taylor Cole
Rosalind Rubin
Ashley Scott
]
And I choose to highlight this field in my search for "gomez"
I get 1 fragment whose value is this:
Nick <em>Gomez</em> Aidan Gillen Steve Harris Gonzalo Menendez
Taylor Cole Rosalind Rubin Ashley Scott
I'm not changing any defaults with fragment size or number of
fragments.
So why am I getting back the whole field and not just one entry for
"Nick Gomez"?
Multiple values for the same fields will result in this behavior for
highlighting... . There is an issue open to try and support discrete
highlighting per value.
If I have a multi-valued field with the following data
autoCompleteContainsCastActor: [
John Cena
Brian J White
Travis Davis
Brian DeCaro
Peter Navy Tuiasosopo
Kyle Clements
Nick Gomez
Aidan Gillen
Steve Harris
Gonzalo Menendez
Taylor Cole
Rosalind Rubin
Ashley Scott
]
And I choose to highlight this field in my search for "gomez"
I get 1 fragment whose value is this:
Nick <em>Gomez</em> Aidan Gillen Steve Harris Gonzalo Menendez
Taylor Cole Rosalind Rubin Ashley Scott
I'm not changing any defaults with fragment size or number of
fragments.
So why am I getting back the whole field and not just one entry for
"Nick Gomez"?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.