



Elasticsearch's learned sparse encoding model (ELSER) that combines the efficiency of traditional search with semantic understanding. Uses neural methods to expand documents and queries with related terms while maintaining sparse representations for efficient retrieval.
Loading more......
Elastic Learned Sparse Encoder (ELSER) is a learned sparse encoding model developed by Elastic that brings semantic search capabilities to Elasticsearch while maintaining the efficiency and explainability of traditional keyword search.
ELSER combines the best of both worlds:
ELSER uses a learned sparse encoding approach:
ELSER achieves strong retrieval performance:
ELSER can be deployed directly in Elasticsearch:
PUT _ml/trained_models/.elser_model_2
{
"input": {
"field_names": ["text_field"]
}
}
Automatic inference during document indexing:
PUT _ingest/pipeline/elser-ingest
{
"processors": [
{
"inference": {
"model_id": ".elser_model_2",
"input_output": [
{
"input_field": "content",
"output_field": "content_embedding"
}
]
}
}
]
}
GET my-index/_search
{
"query": {
"text_expansion": {
"content_embedding": {
"model_id": ".elser_model_2",
"model_text": "How to install security patches?"
}
}
}
}
Included with Elasticsearch, available on: