Skip to content

Conversation

jimczi
Copy link
Contributor

@jimczi jimczi commented Aug 4, 2025

Introduces the "format": "chunks" option for the fields parameter in _search requests. Allows users to retrieve the original text chunks generated by a semantic field’s chunking strategy.

Example usage:

POST test-index/_search
{
  "query": {
    "ids" : {
      "values" : ["1"]
    }
  },
  "fields": [
    {
      "field": "semantic_text_field",
      "format": "chunks"      <1>
    }
  ]
}

Introduces the "format": "chunks" option for the fields parameter in _search requests.
Allows users to retrieve the original text chunks generated by a semantic field’s chunking strategy.

Example usage:
```
POST test-index/_search
{
  "query": {
    "ids" : {
      "values" : ["1"]
    }
  },
  "fields": [
    {
      "field": "semantic_text_field",
      "format": "chunks"      <1>
    }
  ]
}
```
@jimczi jimczi requested a review from kderusso August 4, 2025 16:47
@elasticsearchmachine elasticsearchmachine added the Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch label Aug 4, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search-relevance (Team:Search Relevance)

@elasticsearchmachine
Copy link
Collaborator

Hi @jimczi, I've created a changelog YAML for you.

Copy link
Contributor

github-actions bot commented Aug 4, 2025

🔍 Preview links for changed docs

Copy link
Member

@kderusso kderusso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for taking care of this and iterating!

@jimczi jimczi merged commit 3471987 into elastic:main Aug 7, 2025
33 checks passed
@jimczi jimczi deleted the semantic_text_chunks_format branch August 7, 2025 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>feature :Search Relevance/Vectors Vector search Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants