Skip to content

Commit 564b9c1

Browse files
committed
restore doc
1 parent 605aa87 commit 564b9c1

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

docs/reference/elasticsearch/mapping-reference/semantic-text.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,34 @@ PUT test-index/_doc/1
282282
* Others (such as `elastic` and `elasticsearch`) will automatically truncate
283283
the input.
284284

285+
## Retrieving indexed chunks
286+
```{applies_to}
287+
stack: ga 9.2
288+
serverless: ga
289+
```
290+
291+
You can retrieve the individual chunks generated by your semantic field’s chunking
292+
strategy using the [fields parameter](/reference/elasticsearch/rest-apis/retrieve-selected-fields.md#search-fields-param):
293+
294+
```console
295+
POST test-index/_search
296+
{
297+
"query": {
298+
"ids" : {
299+
"values" : ["1"]
300+
}
301+
},
302+
"fields": [
303+
{
304+
"field": "semantic_text_field",
305+
"format": "chunks" <1>
306+
}
307+
]
308+
}
309+
```
310+
311+
1. Use `"format": "chunks"` to return the field’s text as the original text chunks that were indexed.
312+
285313
## Extracting relevant fragments from semantic text [semantic-text-highlighting]
286314

287315
You can extract the most relevant fragments from a semantic text field by using

0 commit comments

Comments
 (0)