Skip to content

Commit 9eb020a

Browse files
committed
Updating documentation around keyword fields
Signed-off-by: Harsha Vamsi Kalluri <[email protected]>
1 parent 2812031 commit 9eb020a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

_field-types/supported-field-types/keyword.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ redirect_from:
1414

1515
A keyword field type contains a string that is not analyzed. It allows only exact, case-sensitive matches.
1616

17+
Keyword fields are both indexed and have doc_values enabled by default.
18+
1719
If you need to use a field for full-text search, map it as [`text`]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/text/) instead.
1820
{: .note }
1921

@@ -27,7 +29,8 @@ PUT movies
2729
"mappings" : {
2830
"properties" : {
2931
"genre" : {
30-
"type" : "keyword"
32+
"type" : "keyword",
33+
"index" : false // use doc_values instead
3134
}
3235
}
3336
}
@@ -42,7 +45,7 @@ The following table lists the parameters accepted by keyword field types. All pa
4245
Parameter | Description
4346
:--- | :---
4447
`boost` | A floating-point value that specifies the weight of this field toward the relevance score. Values above 1.0 increase the field's relevance. Values between 0.0 and 1.0 decrease the field's relevance. Default is 1.0.
45-
`doc_values` | A Boolean value that specifies whether the field should be stored on disk so that it can be used for aggregations, sorting, or scripting. Default is `false`.
48+
`doc_values` | A Boolean value that specifies whether the field should be stored on disk so that it can be used for aggregations, sorting, or scripting. Default is `true`.
4649
`eager_global_ordinals` | Specifies whether global ordinals should be loaded eagerly on refresh. If the field is often used for aggregations, this parameter should be set to `true`. Default is `false`.
4750
`fields` | To index the same string in several ways (for example, as a keyword and text), provide the fields parameter. You can specify one version of the field to be used for search and another to be used for sorting and aggregations.
4851
`ignore_above` | Any string longer than this integer value should not be indexed. Default is 2147483647. Default dynamic mapping creates a keyword subfield for which `ignore_above` is set to 256.

0 commit comments

Comments
 (0)