Loading

Semantic text field type

Serverless Stack 9.0.0

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_vector or dense_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"
      }
    }
  }
}
		
  1. In this example, the semantic_text field uses a default inference endpoint because the inference_id parameter isn't specified.
Tip

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:

The How-to guides section organizes procedure descriptions and examples into the following guides:

  • Set up and configure semantic_text fields: 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_text fields: Learn how to index pre-chunked content, use copy_to and multi-fields to collect values from multiple fields, and perform updates and partial updates to optimize ingestion costs.

  • Search and retrieve semantic_text fields: Learn how to query semantic_text fields, retrieve indexed chunks, return field embeddings, and highlight the most relevant fragments from search results.