elasticsearch - Elastic - with_positions and with_positions_offsets -
what's difference between with_positions
, with_positions_offsets
regard term_vector
in elasticsearch?
with_positions
instruct elasticsearch (lucene) to, also, index position of terms in original text
this helps order of terms inside field, example other question had here.
with_positions_offsets
instruct elasticsearch (lucene) to, also, index position of terms in original text and character offset information each term (the start position , end position each term, @ character level)
this helps in cases when original text indexed "changed" during analysis phase, example, changing terms in synonyms. these synonyms can have multiple words, changing whole "structure" (positions and offsets) of original text.
in both cases size of index on disk increase. increase smaller with_positions
with_positions_offsets
.
term_vector
options must highlighting!
a great example demonstrating positions
, offsets
can found on lucene , elasticsearch committer blog post:
for sample text, how list of positions each term , character offsets like:
Comments
Post a Comment