Semantic text field type
Serverless Stack
The semantic_text field type simplifies semantic search by providing sensible defaults that automate most of the manual work typically required for vector search. Using semantic_text, you don't have to manually configure mappings, set up ingestion pipelines, or handle chunking. The field type automatically:
- Configures index mappings: Chooses the correct field type (
sparse_vectorordense_vector), dimensions, similarity functions, and storage optimizations based on the inference endpoint. - Generates embeddings during indexing: Automatically generates embeddings when you index documents, without requiring ingestion pipelines or inference processors.
- Handles chunking: Automatically chunks long text documents during indexing.
The following example creates an index mapping with a semantic_text field:
PUT semantic-embeddings
{
"mappings": {
"properties": {
"content": {
"type": "semantic_text"
}
}
}
}
- In this example, the
semantic_textfield uses a default inference endpoint because theinference_idparameter isn't specified.
For a complete example, refer to the Semantic search with semantic_text tutorial.
The semantic_text field type documentation is organized into reference content and how-to guides.
The Reference section provides technical reference content:
- Parameters: Parameter descriptions for
semantic_textfields. - Inference endpoints: Overview of inference endpoints used with
semantic_textfields. - Chunking: How
semantic_textautomatically processes long text passages by generating smaller chunks. - Limitations: Current limitations of
semantic_textfields. - Document count discrepancy: Understanding document counts in
_cat/indicesfor indices withsemantic_textfields. - Querying
semantic_textfields: Supported query types forsemantic_textfields.
The How-to guides section organizes procedure descriptions and examples into the following guides:
Set up and configure
semantic_textfields: Learn how to configure inference endpoints, including default and preconfigured options, ELSER on EIS, custom endpoints, and dedicated endpoints for ingestion and search operations.Ingest data with
semantic_textfields: Learn how to index pre-chunked content, usecopy_toand multi-fields to collect values from multiple fields, and perform updates and partial updates to optimize ingestion costs.Search and retrieve
semantic_textfields: Learn how to querysemantic_textfields, retrieve indexed chunks, return field embeddings, and highlight the most relevant fragments from search results.