ElasticSearch get offsets of highlighted snippets

The client-side approach is actually standard practice.

We have discussed adding the offsets, but are afraid it would lead to more confusion. The offsets provided are specific to Java’s UTF-16 String encoding, which, while they could technically be used to calculate the fragments from $LANG, it’s way more straightforward to parse the response text for the delimiters you specified.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)