Skip to content

Commit 71f95df

Browse files
vagimelinatebower
andauthored
Close content gap for doc_values mapping parameter (#8547)
* Close content gap for doc_value mapping parameters Signed-off-by: Melissa Vagi <[email protected]> * Close content gap for doc_value mapping parameters Signed-off-by: Melissa Vagi <[email protected]> * Update _field-types/mapping-parameters/doc-values.md Signed-off-by: Melissa Vagi <[email protected]> * Update doc-values.md Signed-off-by: Melissa Vagi <[email protected]> * Update _field-types/mapping-parameters/doc-values.md Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: Melissa Vagi <[email protected]> * Update _field-types/mapping-parameters/doc-values.md Signed-off-by: Melissa Vagi <[email protected]> * Update _field-types/mapping-parameters/doc-values.md Signed-off-by: Melissa Vagi <[email protected]> * Update _field-types/mapping-parameters/doc-values.md Signed-off-by: Melissa Vagi <[email protected]> * Update doc-values.md Addressed editorial feedback Signed-off-by: Melissa Vagi <[email protected]> Signed-off-by: Melissa Vagi <[email protected]> * Update _field-types/mapping-parameters/doc-values.md Signed-off-by: Melissa Vagi <[email protected]> * Update doc-values.md Signed-off-by: Melissa Vagi <[email protected]> --------- Signed-off-by: Melissa Vagi <[email protected]> Co-authored-by: Nathan Bower <[email protected]>
1 parent 95c8a8a commit 71f95df

File tree

2 files changed

+47
-1
lines changed

2 files changed

+47
-1
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
layout: default
3+
title: doc_values
4+
parent: Mapping parameters
5+
grand_parent: Mapping and field types
6+
nav_order: 25
7+
has_children: false
8+
has_toc: false
9+
---
10+
11+
# doc_values
12+
13+
By default, OpenSearch indexes most fields for search purposes. The `doc_values ` parameter enables document-to-term lookups for operations such as sorting, aggregations, and scripting.
14+
15+
The `doc_values` parameter accepts the following options.
16+
17+
Option | Description
18+
:--- | :---
19+
`true` | Enables `doc_values` for the field. Default is `true`.
20+
`false` | Disables `doc_values` for the field.
21+
22+
The `doc_values` parameter is not supported for use in text fields.
23+
24+
---
25+
26+
## Example: Creating an index with `doc_values` enabled and disabled
27+
28+
The following example request creates an index with `doc_values` enabled for one field and disabled for another:
29+
30+
```json
31+
PUT my-index-001
32+
{
33+
"mappings": {
34+
"properties": {
35+
"status_code": {
36+
"type": "keyword"
37+
},
38+
"session_id": {
39+
"type": "keyword",
40+
"doc_values": false
41+
}
42+
}
43+
}
44+
}
45+
```
46+
{% include copy-curl.html %}

_field-types/mapping-parameters/dynamic.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ layout: default
33
title: Dynamic
44
parent: Mapping parameters
55
grand_parent: Mapping and field types
6-
nav_order: 25
6+
nav_order: 30
77
has_children: false
88
has_toc: false
99
redirect_from:

0 commit comments

Comments
 (0)