Hello There,
Hello, I have a question regarding Elasticsearch vector search. Our vector index has 768 dimensions, and it contains 25,000,000 documents split into two indices. Here are the results from /_cat/indices
:
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
green open kr-documents 8bCjsGAxQfC8CPPwnTKBCg 32 0 9587847 698158 182.8gb 182.8gb
green open us-documents Es86NloYSVK7xMN7XyzPZg 32 0 17183616 3021606 680.7gb 680.7gb
Here is vector property
"vector": {
"type": "dense_vector",
"dims": 768,
"index": true,
"similarity": "cosine"
}
I've executed the Python code below for vector search, but even after waiting for more than a minute, the search results are not returned, and I receive a ConnectionTimedOut error. I need to retry 6-8 times to get the search results.
try:
es_resp: dict = ES_MODULE.search(
index=target_index,
query=query,
knn={
"field": "vector",
"query_vector": embedding,
"k": kwargs.get("k", 200), # It should be larger than 200
"num_candidates": 200,
"similarity": 0.8,
},
size=size,
source=["patent_number", "country", "vector"],
)
except ConnectionTimeout:
LOGGER.warning(msg={"message": f"Connection Timed out(TRIED {retry_count} / 10)"})
else:
break
I will also provide additional information related to the nodes. Each node has 32GB of RAM.
- Server 1
- master
- data_content
- data_content
- coordinate_only
- Server 2
- data_content
The reason for specifying the RAM of each node as 32GB is that I assumed the required RAM capacity is 72GB according to the formula below, and there are three data_content nodes. Therefore, I thought that each node would need 24GB.
num_vectors * 4 * (num_dimensions + 12)
refer
If you could assist me with this issue, it would be greatly appreciated.