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:

sample text

for sample text, how list of positions each term , character offsets like:

enter image description here


Comments

Popular posts from this blog

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -