Skip to content

Commit 6f8dfeb

Browse files
Add experimental and warnings to vector functions (elastic#42205)
1 parent 2c8aa0e commit 6f8dfeb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/reference/query-dsl/script-score-query.asciidoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,18 @@ to be the most efficient by using the internal mechanisms.
7878

7979
[[vector-functions]]
8080
===== Functions for vector fields
81+
82+
experimental[]
83+
8184
These functions are used for
8285
for <<dense-vector,`dense_vector`>> and
8386
<<sparse-vector,`sparse_vector`>> fields.
8487

88+
NOTE: During vector functions' calculation, all matched documents are
89+
linearly scanned. Thus, expect the query time grow linearly
90+
with the number of matched documents. For this reason, we recommend
91+
to limit the number of matched documents with a `query` parameter.
92+
8593
For dense_vector fields, `cosineSimilarity` calculates the measure of
8694
cosine similarity between a given query vector and document vectors.
8795

0 commit comments

Comments
 (0)