Skip to content

Commit f5bccad

Browse files
committed
[DOCS] Correct guidance for index_options mapping parm (#52899)
Adds a warning admonition stating that the `index_options` mapping parameter is intended only for `text` fields. Removes an outdated statement regarding default values for numeric and other datatypes.
1 parent 7eb4c07 commit f5bccad

File tree

1 file changed

+20
-23
lines changed

1 file changed

+20
-23
lines changed

docs/reference/mapping/params/index-options.asciidoc

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,33 @@
22
=== `index_options`
33

44
The `index_options` parameter controls what information is added to the
5-
inverted index, for search and highlighting purposes. It accepts the
6-
following settings:
5+
inverted index for search and highlighting purposes.
76

8-
[horizontal]
9-
`docs`::
10-
11-
Only the doc number is indexed. Can answer the question _Does this term
12-
exist in this field?_
7+
[WARNING]
8+
====
9+
The `index_options` parameter is intended for use with <<text,`text`>> fields
10+
only. Avoid using `index_options` with other field datatypes.
11+
====
1312

14-
`freqs`::
13+
It accepts the following values:
1514

16-
Doc number and term frequencies are indexed. Term frequencies are used to
17-
score repeated terms higher than single terms.
15+
`docs`::
16+
Only the doc number is indexed. Can answer the question _Does this term
17+
exist in this field?_
1818

19-
`positions`::
19+
`freqs`::
20+
Doc number and term frequencies are indexed. Term frequencies are used to
21+
score repeated terms higher than single terms.
2022

21-
Doc number, term frequencies, and term positions (or order) are indexed.
22-
Positions can be used for
23-
<<query-dsl-match-query-phrase,proximity or phrase queries>>.
23+
`positions` (default)::
24+
Doc number, term frequencies, and term positions (or order) are indexed.
25+
Positions can be used for
26+
<<query-dsl-match-query-phrase,proximity or phrase queries>>.
2427

2528
`offsets`::
26-
27-
Doc number, term frequencies, positions, and start and end character
28-
offsets (which map the term back to the original string) are indexed.
29-
Offsets are used by the <<unified-highlighter,unified highlighter>> to speed up highlighting.
30-
31-
NOTE: <<number,Numeric fields>> don't support the `index_options` parameter any longer.
32-
33-
<<text,`text`>> fields use `positions` as the default, and all other fields use
34-
`docs` as the default.
29+
Doc number, term frequencies, positions, and start and end character
30+
offsets (which map the term back to the original string) are indexed.
31+
Offsets are used by the <<unified-highlighter,unified highlighter>> to speed up highlighting.
3532

3633
[source,console]
3734
--------------------------------------------------

0 commit comments

Comments
 (0)