Semantic field type
The semantic field mapping can be added regardless of license state. However, it calls the Inference API, which requires an appropriate license. Using a semantic field without the appropriate license causes operations such as indexing and reindexing to fail.
The semantic field type simplifies semantic and multimodal search across text, images, audio, video, and PDF files. With a compatible multimodal embedding model, you can search from any supported input type to any other supported input type. The field automatically:
- Generates embeddings when you index field values, without an ingest pipeline or inference processor.
- Splits long text into smaller passages, called chunks.
- Indexes the generated embeddings using default index options that optimize for common use cases.
- Searches the embeddings generated for each value or text chunk.
For multimodal search, Elastic recommends Jina multimodal embeddings.
Elasticsearch refers to semantic and semantic_text as inference fields: mapped fields that use inference endpoints and store generated embeddings in internal subfields.
Multiple semantic fields can use the same inference endpoint. For example, an index can use one field for image embeddings and another for description embeddings, then search either field or both.
The semantic field type shares many capabilities with semantic_text, but semantic_text accepts text only. If you're working exclusively with text, consider using semantic_text.
For a comparison table, refer to Should I use semantic_text or semantic?.
Elasticsearch provides two field types that generate and store embeddings automatically. Choose the field type based on the content and embedding model you want to use.
semantic_text accepts text only. To index or search images, audio, video, or PDF files, use semantic with a compatible multimodal embedding endpoint.
| Aspect | semantic |
semantic_text |
|---|---|---|
| Input | Text, images, audio, video, and PDF files | Text only |
| Supported inference task types | embedding |
embedding, text_embedding, and sparse_embedding |
| Vector storage | Dense vectors only | Dense or sparse vectors |
inference_id |
Required. No default endpoint is provided. | Optional. A default endpoint is used when you don't specify one. |
search_inference_id |
Optional. If omitted, inference_id is used for search. |
Optional. If omitted, inference_id is used for search. |
chunking_settings |
Supported for text input. Chunking does not apply to non-text input. | Supported for text input. |
index_options |
Supports dense_vector options. |
Supports dense_vector and sparse_vector options. |
meta |
Supported. | Supported. |
| Availability |
|
|
The following example creates an index mapping with a semantic field using .jina-embeddings-v5-omni-small, the preconfigured inference endpoint for the Jina Embeddings v5 Omni Small model:
PUT semantic-embeddings
{
"mappings": {
"properties": {
"content": {
"type": "semantic",
"inference_id": ".jina-embeddings-v5-omni-small"
}
}
}
}
Unlike semantic_text, a semantic field has no default inference endpoint. You must use an endpoint that uses the embedding task type and specify its ID in the field mapping. The endpoint determines which input modalities the field supports.
The following example customizes the search endpoint, text chunking, and dense-vector index options:
PUT my-semantic-index
{
"mappings": {
"properties": {
"content": {
"type": "semantic",
"inference_id": "my-index-embedding-endpoint",
"search_inference_id": "my-search-embedding-endpoint",
"chunking_settings": {
"strategy": "word",
"max_chunk_size": 250,
"overlap": 50
},
"index_options": {
"dense_vector": {
"type": "int8_hnsw"
}
}
}
}
}
}
- Endpoint used to generate embeddings while indexing.
- Compatible endpoint used to generate embeddings while querying.
- Splits text into chunks of at most 250 words, with an overlap of 50 words.
- Indexes the embeddings using
int8_hnswquantization.
Follow the multimodal search quickstart to index a small collection of images into Elasticsearch and search those images using text, other images, and PDFs.
Refer to the semantic field reference for the complete technical details, including: