-
Notifications
You must be signed in to change notification settings - Fork 56
knn search #351
Comments
It depends on your usecase. By setting k and size to 10, for example, you get the closest 10 results for your query (aka top 10 neighbors of the vector in your query). |
thanks,i get it The KNN index has millions of docs,Knn search fast |
and how to cancel the warmup index? |
hi, |
Check if your query is a bruteforce script or Approximate k-NN : https://opendistro.github.io/for-elasticsearch-docs/docs/knn/ |
Approximate k-NN Search |
Hi @fendoukobe Here is how we calculate memory: https://opendistro.github.io/for-elasticsearch-docs/docs/knn/performance-tuning/#estimating-memory-usage. After the slow query, could you paste the knn stats? With regards to faiss support, we are actively working on it here. I am working on an RFC and will post soon. We want to support faiss's product quantization in order reduce memory consumption. The branch on this repo is a development branch and should not be used in production. It only includes faiss's HNSW implementation, which should not have significant performance differences compared to nmslib. |
sorry,i can not provide the data now ,because the production environment is somewhere else. |
@fendoukobe I see. What is the dimension on your vectors? Also, how many nodes are you running on and what type of machines are you using? |
the demension is 1024, My configuration is as follows PUT /_cluster/settings |
One potential way to speed up is to not return the vector field in your query and only return the document id (if your use case lets you). This can be done by adding the query parameter Can you provide the query you are using in the case of high latency? |
good idea |
""" GET my-knn-index-1/_search
{
"size": 2,
"query": {
"knn": {
"my_vector2": {
"vector": [2, 3, 5, 6],
"k": 2
}
}
}
}
k is the number of neighbors the search of each graph will return. You must also include the size option. This option indicates how many results the query actually returns. The plugin returns k amount of results for each shard (and each segment) and size amount of results for the entire query. The plugin supports a maximum k value of 10,000."""
hi,I want to know what the K in this passage means, And,In development I should set the appropriate value for this k, 10 or 100? or something else
The text was updated successfully, but these errors were encountered: