File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
docs/reference/elasticsearch/mapping-reference Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff 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
287315You can extract the most relevant fragments from a semantic text field by using
You can’t perform that action at this time.
0 commit comments