| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 | [[index-options]]=== `index_options`The `index_options` parameter controls what information is added to theinverted index for search and highlighting purposes. Only term-based fieldtypes like <<text,`text`>> and <<keyword,`keyword`>> support thisconfiguration.The parameter accepts one of the following values. Each value retrievesinformation from the previous listed values. For example, `freqs` contains`docs`; `positions` contains both `freqs` and `docs`.`docs`::Only the doc number is indexed. Can answer the question _Does this term exist inthis field?_`freqs`::Doc number and term frequencies are indexed. Term frequencies are used to scorerepeated terms higher than single terms.`positions` (default)::Doc number, term frequencies, and term positions (or order) are indexed.Positions can be used for <<query-dsl-match-query-phrase,proximity or phrasequeries>>.`offsets`::Doc number, term frequencies, positions, and start and end character offsets(which map the term back to the original string) are indexed. Offsets are usedby the <<unified-highlighter,unified highlighter>> to speed up highlighting.[source,console]--------------------------------------------------PUT my-index-000001{  "mappings": {    "properties": {      "text": {        "type": "text",        "index_options": "offsets"      }    }  }}PUT my-index-000001/_doc/1{  "text": "Quick brown fox"}GET my-index-000001/_search{  "query": {    "match": {      "text": "brown fox"    }  },  "highlight": {    "fields": {      "text": {} <1>    }  }}--------------------------------------------------<1> The `text` field will use the postings for the highlighting by default because `offsets` are indexed.
 |