Skip to content

Commit b4a62ac

Browse files
Update kNN search guide with knn parallelization (#100705)
Relates to PR #98204
1 parent 3583d60 commit b4a62ac

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

docs/reference/how-to/knn-search.asciidoc

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,19 @@ since it relies on separate data structures to perform the search. Before
8383
using the <<include-exclude, `excludes`>> parameter, make sure to review the
8484
downsides of omitting fields from `_source`.
8585

86+
Another option is to use <<synthetic-source,synthetic `_source`>> if all
87+
your index fields support it.
88+
89+
8690
[discrete]
8791
=== Reduce the number of index segments
8892

8993
{es} shards are composed of segments, which are internal storage elements in
90-
the index. For approximate kNN search, {es} stores the dense vector values of
91-
each segment as an HNSW graph. kNN search must check each segment, searching
92-
through one HNSW graph after another. This means kNN search can be
93-
significantly faster if there are fewer segments. By default, {es} periodically
94+
the index. For approximate kNN search, {es} stores the vector values of
95+
each segment as a separate HNSW graph, so kNN search must check each segment.
96+
The recent parallelization of kNN search made it much faster to search across
97+
multiple segments, but still kNN search can be up to several times
98+
faster if there are fewer segments. By default, {es} periodically
9499
merges smaller segments into larger ones through a background
95100
<<index-modules-merge, merge process>>. If this isn't sufficient, you can take
96101
explicit steps to reduce the number of index segments.

0 commit comments

Comments
 (0)