Skip to content

Commit 096100c

Browse files
authored
Revert "Revert "Add skip_list parameter to numeric field type (default: false…" (#10677)
This reverts commit 05a486f.
1 parent 9d987cd commit 096100c

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

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

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,38 @@ PUT testindex/_doc/1
5959
```
6060
{% include copy-curl.html %}
6161

62+
## Example: Skip list
63+
64+
Use the `skip_list` parameter for better query performance. The `skip_list` parameter is particularly beneficial for fields that are frequently used in `range` queries or aggregations because it allows the query engine to skip over document ranges that don't match the query criteria.
65+
66+
Create a mapping with skip list indexing enabled:
67+
68+
```json
69+
PUT /testindex_skiplist
70+
{
71+
"mappings" : {
72+
"properties" : {
73+
"price" : {
74+
"type" : "double",
75+
"skip_list" : true
76+
}
77+
}
78+
}
79+
}
80+
```
81+
{% include copy-curl.html %}
82+
83+
Index a document containing a numeric value:
84+
85+
```json
86+
PUT testindex_skiplist/_doc/1
87+
{
88+
"price" : 19.99
89+
}
90+
```
91+
{% include copy-curl.html %}
92+
93+
6294
## Scaled float field type
6395

6496
A scaled float field type is a floating-point value that is multiplied by the scale factor and stored as a long value. It takes all optional parameters taken by number field types, plus an additional scaling_factor parameter. The scale factor is required when creating a scaled float.
@@ -110,6 +142,7 @@ Parameter | Description
110142
`index` | A Boolean value that specifies whether the field should be searchable. Default is `true`.
111143
`meta` | Accepts metadata for this field.
112144
[`null_value`]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/index#null-value) | A value to be used in place of `null`. Must be of the same type as the field. If this parameter is not specified, the field is treated as missing when its value is `null`. Default is `null`.
145+
`skip_list` | A Boolean value that specifies whether to enable skip list indexing for doc values. When enabled, this creates indexed doc values that can improve performance for `range` queries and aggregations by allowing the query engine to skip over irrelevant document ranges. Default is `false`.
113146
`store` | A Boolean value that specifies whether the field value should be stored and can be retrieved separately from the _source field. Default is `false`.
114147

115148
Scaled float has an additional required parameter: `scaling_factor`.

0 commit comments

Comments
 (0)