Skip to content

Commit 3298ac7

Browse files
authored
Merge branch 'main' into bugfix/create-index-bad-request
2 parents 38e10ba + bea3af2 commit 3298ac7

File tree

17 files changed

+302
-224
lines changed

17 files changed

+302
-224
lines changed

docs/reference/elasticsearch/mapping-reference/doc-values.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ Most fields are [indexed](/reference/elasticsearch/mapping-reference/mapping-ind
99

1010
Sorting, aggregations, and access to field values in scripts requires a different data access pattern. Instead of looking up the term and finding documents, we need to be able to look up the document and find the terms that it has in a field.
1111

12-
Doc values are the on-disk data structure, built at document index time, which makes this data access pattern possible. They store the same values as the `_source` but in a column-oriented fashion that is way more efficient for sorting and aggregations. Doc values are supported on almost all field types, with the *notable exception of `text` and `annotated_text` fields*.
12+
The `doc_values` field is an on-disk data structure that is built at document index time and enables efficient data access. It stores the same values as `_source`, but in a columnar format that is more efficient for sorting and aggregation.
13+
14+
Doc values are supported on most field types, excluding `text` and `annotated_text` fields. See also [Disabling doc values](#_disabling_doc_values).
1315

1416
## Doc-value-only fields [doc-value-only-fields]
1517

@@ -41,7 +43,15 @@ PUT my-index-000001
4143

4244
## Disabling doc values [_disabling_doc_values]
4345

44-
All fields which support doc values have them enabled by default. If you are sure that you don’t need to sort or aggregate on a field, or access the field value from a script, you can disable doc values in order to save disk space:
46+
For all fields that support them, `doc_values` are enabled by default. If you're certain you don't need to sort or aggregate on a field, or access its value from a script, you can disable `doc_values` in order to save disk space.
47+
48+
::::{note}
49+
You cannot disable doc values for [`wildcard`](/reference/elasticsearch/mapping-reference/keyword.md#wildcard-field-type) fields.
50+
51+
In some field types, such as [`search_as_you_type`](/reference/elasticsearch/mapping-reference/search-as-you-type.md), doc values appear in API responses but can't be configured. Enabling or disabling `doc_values` for these fields might result in an error or have no effect.
52+
::::
53+
54+
In the following example, `doc_values` is disabled on one field:
4555

4656
```console
4757
PUT my-index-000001
@@ -64,9 +74,7 @@ PUT my-index-000001
6474
2. The `session_id` has `doc_values` disabled, but can still be queried.
6575

6676

67-
::::{note}
68-
You cannot disable doc values for [`wildcard`](/reference/elasticsearch/mapping-reference/keyword.md#wildcard-field-type) fields.
69-
::::
77+
7078

7179

7280

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,6 @@ tests:
333333
- class: org.elasticsearch.smoketest.MlWithSecurityIT
334334
method: test {yaml=ml/3rd_party_deployment/Test start deployment fails while model download in progress}
335335
issue: https://github.com/elastic/elasticsearch/issues/120814
336-
- class: org.elasticsearch.xpack.esql.plugin.MatchOperatorIT
337-
method: testScoring_Zero_OutsideQuery
338-
issue: https://github.com/elastic/elasticsearch/issues/124132
339336
- class: org.elasticsearch.search.query.QueryPhaseTimeoutTests
340337
method: testScorerTimeoutPoints
341338
issue: https://github.com/elastic/elasticsearch/issues/124140
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"inference.chat_completion_unified": {
3+
"documentation": {
4+
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/chat-completion-inference.html",
5+
"description": "Perform chat completion inference"
6+
},
7+
"stability": "stable",
8+
"visibility": "public",
9+
"headers": {
10+
"accept": [
11+
"text/event-stream"
12+
],
13+
"content_type": [
14+
"application/json"
15+
]
16+
},
17+
"url": {
18+
"paths": [
19+
{
20+
"path": "/_inference/chat_completion/{inference_id}/_stream",
21+
"methods": [
22+
"POST"
23+
],
24+
"parts": {
25+
"inference_id": {
26+
"type": "string",
27+
"description": "The inference Id"
28+
}
29+
}
30+
}
31+
]
32+
},
33+
"body": {
34+
"description": "The inference payload"
35+
}
36+
}
37+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"inference.completion": {
3+
"documentation": {
4+
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/post-inference-api.html",
5+
"description": "Perform completion inference"
6+
},
7+
"stability": "stable",
8+
"visibility": "public",
9+
"headers": {
10+
"accept": [
11+
"application/json"
12+
],
13+
"content_type": [
14+
"application/json"
15+
]
16+
},
17+
"url": {
18+
"paths": [
19+
{
20+
"path": "/_inference/completion/{inference_id}",
21+
"methods": [
22+
"POST"
23+
],
24+
"parts": {
25+
"inference_id": {
26+
"type": "string",
27+
"description": "The inference Id"
28+
}
29+
}
30+
}
31+
]
32+
},
33+
"body": {
34+
"description": "The inference payload"
35+
}
36+
}
37+
}

rest-api-spec/src/main/resources/rest-api-spec/api/inference.get.json

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,49 @@
11
{
2-
"inference.get":{
3-
"documentation":{
4-
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/get-inference-api.html",
5-
"description":"Get an inference endpoint"
2+
"inference.get": {
3+
"documentation": {
4+
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/get-inference-api.html",
5+
"description": "Get an inference endpoint"
66
},
7-
"stability":"stable",
8-
"visibility":"public",
9-
"headers":{
10-
"accept": [ "application/json"]
7+
"stability": "stable",
8+
"visibility": "public",
9+
"headers": {
10+
"accept": [
11+
"application/json"
12+
]
1113
},
12-
"url":{
13-
"paths":[
14+
"url": {
15+
"paths": [
1416
{
15-
"path":"/_inference",
16-
"methods":[
17+
"path": "/_inference",
18+
"methods": [
1719
"GET"
1820
]
1921
},
2022
{
21-
"path":"/_inference/{inference_id}",
22-
"methods":[
23+
"path": "/_inference/{inference_id}",
24+
"methods": [
2325
"GET"
2426
],
25-
"parts":{
26-
"inference_id":{
27-
"type":"string",
28-
"description":"The inference Id"
27+
"parts": {
28+
"inference_id": {
29+
"type": "string",
30+
"description": "The inference Id"
2931
}
3032
}
3133
},
3234
{
33-
"path":"/_inference/{task_type}/{inference_id}",
34-
"methods":[
35+
"path": "/_inference/{task_type}/{inference_id}",
36+
"methods": [
3537
"GET"
3638
],
37-
"parts":{
38-
"task_type":{
39-
"type":"string",
40-
"description":"The task type"
39+
"parts": {
40+
"task_type": {
41+
"type": "string",
42+
"description": "The task type"
4143
},
42-
"inference_id":{
43-
"type":"string",
44-
"description":"The inference Id"
44+
"inference_id": {
45+
"type": "string",
46+
"description": "The inference Id"
4547
}
4648
}
4749
}

rest-api-spec/src/main/resources/rest-api-spec/api/inference.inference.json

Lines changed: 0 additions & 49 deletions
This file was deleted.
Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,53 @@
11
{
2-
"inference.put":{
3-
"documentation":{
4-
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/put-inference-api.html",
5-
"description":"Configure an inference endpoint for use in the Inference API"
2+
"inference.put": {
3+
"documentation": {
4+
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/put-inference-api.html",
5+
"description": "Configure an inference endpoint for use in the Inference API"
66
},
7-
"stability":"stable",
8-
"visibility":"public",
9-
"headers":{
10-
"accept": [ "application/json"],
11-
"content_type": ["application/json"]
7+
"stability": "stable",
8+
"visibility": "public",
9+
"headers": {
10+
"accept": [
11+
"application/json"
12+
],
13+
"content_type": [
14+
"application/json"
15+
]
1216
},
13-
"url":{
14-
"paths":[
17+
"url": {
18+
"paths": [
1519
{
16-
"path":"/_inference/{inference_id}",
17-
"methods":[
20+
"path": "/_inference/{inference_id}",
21+
"methods": [
1822
"PUT"
1923
],
20-
"parts":{
21-
"inference_id":{
22-
"type":"string",
23-
"description":"The inference Id"
24+
"parts": {
25+
"inference_id": {
26+
"type": "string",
27+
"description": "The inference Id"
2428
}
2529
}
2630
},
2731
{
28-
"path":"/_inference/{task_type}/{inference_id}",
29-
"methods":[
32+
"path": "/_inference/{task_type}/{inference_id}",
33+
"methods": [
3034
"PUT"
3135
],
32-
"parts":{
33-
"task_type":{
34-
"type":"string",
35-
"description":"The task type"
36+
"parts": {
37+
"task_type": {
38+
"type": "string",
39+
"description": "The task type"
3640
},
37-
"inference_id":{
38-
"type":"string",
39-
"description":"The inference Id"
41+
"inference_id": {
42+
"type": "string",
43+
"description": "The inference Id"
4044
}
4145
}
4246
}
4347
]
4448
},
45-
"body":{
46-
"description":"The inference endpoint's task and service settings"
49+
"body": {
50+
"description": "The inference endpoint's task and service settings"
4751
}
4852
}
4953
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"inference.rerank": {
3+
"documentation": {
4+
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/post-inference-api.html",
5+
"description": "Perform reranking inference"
6+
},
7+
"stability": "stable",
8+
"visibility": "public",
9+
"headers": {
10+
"accept": [
11+
"application/json"
12+
],
13+
"content_type": [
14+
"application/json"
15+
]
16+
},
17+
"url": {
18+
"paths": [
19+
{
20+
"path": "/_inference/rerank/{inference_id}",
21+
"methods": [
22+
"POST"
23+
],
24+
"parts": {
25+
"inference_id": {
26+
"type": "string",
27+
"description": "The inference Id"
28+
}
29+
}
30+
}
31+
]
32+
},
33+
"body": {
34+
"description": "The inference payload"
35+
}
36+
}
37+
}

0 commit comments

Comments
 (0)