Spaces:
Running
Running
Z User commited on
Commit ·
384f97f
1
Parent(s): fb0ec21
fix(os): knn engine nmslib -> faiss (nmslib deprecated on OpenSearch 3.x)
Browse files- app/stores/opensearch.py +2 -1
app/stores/opensearch.py
CHANGED
|
@@ -66,7 +66,8 @@ class OpenSearchStore:
|
|
| 66 |
knn_vector = {
|
| 67 |
"type": "knn_vector",
|
| 68 |
"dimension": dim,
|
| 69 |
-
|
|
|
|
| 70 |
}
|
| 71 |
results: Dict[str, bool] = {}
|
| 72 |
results["accounts"] = await self._put_index("accounts", {
|
|
|
|
| 66 |
knn_vector = {
|
| 67 |
"type": "knn_vector",
|
| 68 |
"dimension": dim,
|
| 69 |
+
# nmslib is deprecated (cannot create new indexes on OpenSearch 3.x)
|
| 70 |
+
"method": {"name": "hnsw", "space_type": "cosinesimil", "engine": "faiss"},
|
| 71 |
}
|
| 72 |
results: Dict[str, bool] = {}
|
| 73 |
results["accounts"] = await self._put_index("accounts", {
|