mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-05-01 19:32:38 +02:00
Fix collection management sync prob (#544)
* Address creation/deletion sync problems * Fix object writer management * Get Milvus to use ANN
This commit is contained in:
parent
b7bf7388aa
commit
3e23d3c3ed
4 changed files with 19 additions and 32 deletions
|
|
@ -144,14 +144,6 @@ class DocVectors:
|
|||
|
||||
coll = self.collections[(dim, user, collection)]
|
||||
|
||||
search_params = {
|
||||
"metric_type": "COSINE",
|
||||
"params": {
|
||||
"radius": 0.1,
|
||||
"range_filter": 0.8
|
||||
}
|
||||
}
|
||||
|
||||
logger.debug("Loading...")
|
||||
self.client.load_collection(
|
||||
collection_name=coll,
|
||||
|
|
@ -161,10 +153,11 @@ class DocVectors:
|
|||
|
||||
res = self.client.search(
|
||||
collection_name=coll,
|
||||
anns_field="vector",
|
||||
data=[embeds],
|
||||
limit=limit,
|
||||
output_fields=fields,
|
||||
search_params=search_params,
|
||||
search_params={ "metric_type": "COSINE" },
|
||||
)[0]
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -144,14 +144,6 @@ class EntityVectors:
|
|||
|
||||
coll = self.collections[(dim, user, collection)]
|
||||
|
||||
search_params = {
|
||||
"metric_type": "COSINE",
|
||||
"params": {
|
||||
"radius": 0.1,
|
||||
"range_filter": 0.8
|
||||
}
|
||||
}
|
||||
|
||||
logger.debug("Loading...")
|
||||
self.client.load_collection(
|
||||
collection_name=coll,
|
||||
|
|
@ -161,10 +153,11 @@ class EntityVectors:
|
|||
|
||||
res = self.client.search(
|
||||
collection_name=coll,
|
||||
anns_field="vector",
|
||||
data=[embeds],
|
||||
limit=limit,
|
||||
output_fields=fields,
|
||||
search_params=search_params,
|
||||
search_params={ "metric_type": "COSINE" },
|
||||
)[0]
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue