elasticsearch/elasticsearch — Issue #1659: Highlighting broken with synonym substitution
Author: jmwilson
Created: 2012-02-03 20:59:00+00:00
State: open

If a synonym matches a term that is shorter than the returned value, highlighting returns an error.

E.g. the synonym file has this line:

al, alan, albert, alex, alexander, alexandr

and I have a document such as:

{
"name": "Al Pacino"
...
}

if I do a search on "Albert Pacino" with highlighting enabled for the name field, I get an error:

Fetch Failed [Failed to highlight field [name]]]; nested: InvalidTokenOffsetsException[Token alexandr exceeds length of provided text sized 7];