Elastic - with_positions and with_positions_offsets

What is the difference between with_positionsand with_positions_offsetsin relation term_vectorin Elasticsearch?

+4
source share
1 answer
  • with_positions will instruct Elasticsearch (Lucene) and also index the position of terms in the source text

This helps with the order of terms inside the field, for example, for another question that you had here .

  • with_positions_offsetswill instruct Elasticsearch (Lucene) to also index the position of terms in the source text and information about the character offset of each term (start position and end position for each at the character level)

, , , "" , , . , "" ( ) .


. with_positions with_positions_offsets.

term_vector highlighting!


, positions offsets, Lucene Elasticsearch :

Sample text

:

enter image description here

+8
source

Source: https://habr.com/ru/post/1613906/


All Articles