Elasticsearch Vector Search
Elasticsearch vector search is vector similarity search introduced on top of Elasticsearch's existing full-text capabilities, centered on the dense_vector field type and kNN queries. Its position is the unification of the retrieval platform: teams no longer need a separate system for semantic retrieval, since keyword search and vector recall run in the same cluster under the same permissions.
Core principles
A field is declared as dense_vector in the mapping with a specified dimension and similarity metric, and on write the array computed by the embedding model is stored directly in the document. Retrieval uses kNN search, where the candidate set size and the number of returned results can be set, and the server performs approximate nearest neighbor retrieval on segment files. Recent implementations also support combining kNN with ordinary queries, filtering first and then running vector retrieval on the subset, so that filtering does not empty out the recall results.
The underlying index is Lucene's segment structure, with vectors stored in segments in approximate nearest neighbor data structures that update with refresh and merge. This design is consistent with its distributed model: index sharding, replicas, rolling upgrades and snapshot backups all reuse existing mechanisms, and a vector field is just another field type rather than a separate storage system.
Its real advantage lies in BM25 hybrid search: the same query carries both keyword match scores and vector similarity scores, and the results are merged through reciprocal rank fusion (RRF) and similar methods to take the best of both. Keywords excel at exact terms, model numbers and names, while vectors excel at semantic paraphrase and cross-language expression, and the fused overall recall quality is usually better than either channel alone. It can also use the platform's existing capabilities for aggregation, highlighting and permission filtering, which many dedicated vector databases lack.
Key points
Field design: dense_vector requires a dimension, which cannot be changed freely once written; whether indexing is enabled determines whether kNN is possible, and storing without indexing allows later recomputation.
Memory and segment merging: vector indexes occupy off-heap memory, and resource overhead is notable during segment merges, so node specifications and merge strategy must be planned at scale.
Selection judgment: for teams already using Elasticsearch for full-text search and needing semantic capability, the incremental cost of using it is lowest; for new projects doing pure vector retrieval and chasing extreme recall performance, a dedicated vector database may be lighter.
Common misconceptions
First, assuming that adding a vector field generates embeddings automatically, when vectors must be computed in the application layer and then written. Second, blindly running kNN over all data without filtering, making the candidate set too large and latency rise. Third, ignoring the match between dimension and metric, since a wrong similarity metric distorts ranking entirely.
Application scenarios
Snapshots and rebuilding: vector fields enter the snapshot and restore process like ordinary fields, but upgrading the embedding model often requires a full index rebuild, which brings significant compute and storage overhead. It is advisable to keep the original text in the mapping as well, so vectors can be recomputed with a new model at any time without re-collecting data.
Multilingual and semantic generalization: with multilingual embedding models, the same batch of documents can be matched by queries in different languages, which is clearly valuable in cross-border e-commerce and overseas business; however, multilingual vectors often distinguish professional terminology less well than keyword matching, so hybrid retrieval is almost mandatory rather than optional.
Application scenarios
In-site hybrid search, semantic retrieval of logs and tickets, e-commerce product search, enterprise document retrieval, similar-event matching for monitoring alerts, and multilingual knowledge retrieval.