I re-indexed everything, and the shifting problem went away. Now I
have a much worse problem. In my query:
"highlight":{"fields":{"Summary":{},"Content":{"order":"score"}}}
Because I am requesting highlighting for every field that is queried,
I expect some highlighting for every hit. However, only a minority of
hits have any. Most hits come back like this:
"highlight" : {"Content" : , "Summary" : null}
But it gets much weirder. For those hits that do have highlighting,
some are okay, but others contain fragments from the wrong document.
That is, the highlighting for the hit on document A contains fragments
found nowhere in document A but instead in document B. Document B is
also a hit, which may or may not have any highlighting, and if it does
it may or may not be the correct highlighting.
I re-mapped and re-indexed everything several times with the same
results each time. The relevant part of the mapping is:
"Content":{"term_vector":"with_positions_offsets", "type":"string"},
"Summary":{"term_vector":"with_positions_offsets","type":"string"}
I can't see what could be wrong, but obviously something is bad
wrong. Ideas?
On Jan 3, 6:42 pm, timscott tsc...@lunaversesoftware.com wrote:
I got highlighting to work...well sorta. The highlighting is frequently
shifted. For example, when I search for "balance" many of the highlights
are like this:
... Average ledger balance this period ...
As you can see the highlighting is shifted to the left by 4 characters. The
shift seems to vary from 0 to the length of the term.
Did something go bad at indexing time? Ideas?
View this message in context:http://elasticsearch-users.115913.n3.nabble.com/Can-t-Get-Highlightin...
Sent from the Elasticsearch Users mailing list archive at Nabble.com.