@vectorstores/elastic-search 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +11 -0
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.edge-light.d.ts +1 -0
- package/dist/index.edge-light.js +11 -0
- package/dist/index.js +11 -0
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -261,6 +261,17 @@ function getElasticSearchClient({ esUrl, esCloudId, esApiKey, esUsername, esPass
|
|
|
261
261
|
ids: topKIDs
|
|
262
262
|
};
|
|
263
263
|
}
|
|
264
|
+
async exists(refDocId) {
|
|
265
|
+
const result = await this.elasticSearchClient.count({
|
|
266
|
+
index: this.indexName,
|
|
267
|
+
query: {
|
|
268
|
+
term: {
|
|
269
|
+
"metadata.ref_doc_id": refDocId
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
});
|
|
273
|
+
return result.count > 0;
|
|
274
|
+
}
|
|
264
275
|
}
|
|
265
276
|
|
|
266
277
|
exports.ElasticSearchVectorStore = ElasticSearchVectorStore;
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.edge-light.js
CHANGED
|
@@ -259,6 +259,17 @@ function getElasticSearchClient({ esUrl, esCloudId, esApiKey, esUsername, esPass
|
|
|
259
259
|
ids: topKIDs
|
|
260
260
|
};
|
|
261
261
|
}
|
|
262
|
+
async exists(refDocId) {
|
|
263
|
+
const result = await this.elasticSearchClient.count({
|
|
264
|
+
index: this.indexName,
|
|
265
|
+
query: {
|
|
266
|
+
term: {
|
|
267
|
+
"metadata.ref_doc_id": refDocId
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
return result.count > 0;
|
|
272
|
+
}
|
|
262
273
|
}
|
|
263
274
|
|
|
264
275
|
export { ElasticSearchVectorStore };
|
package/dist/index.js
CHANGED
|
@@ -259,6 +259,17 @@ function getElasticSearchClient({ esUrl, esCloudId, esApiKey, esUsername, esPass
|
|
|
259
259
|
ids: topKIDs
|
|
260
260
|
};
|
|
261
261
|
}
|
|
262
|
+
async exists(refDocId) {
|
|
263
|
+
const result = await this.elasticSearchClient.count({
|
|
264
|
+
index: this.indexName,
|
|
265
|
+
query: {
|
|
266
|
+
term: {
|
|
267
|
+
"metadata.ref_doc_id": refDocId
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
return result.count > 0;
|
|
272
|
+
}
|
|
262
273
|
}
|
|
263
274
|
|
|
264
275
|
export { ElasticSearchVectorStore };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vectorstores/elastic-search",
|
|
3
3
|
"description": "Elastic Search Storage for vectorstores",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"vitest": "^3.0.9",
|
|
38
|
-
"@vectorstores/core": "0.1.
|
|
38
|
+
"@vectorstores/core": "0.1.4",
|
|
39
39
|
"@vectorstores/env": "0.1.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@vectorstores/core": "0.1.
|
|
42
|
+
"@vectorstores/core": "0.1.4",
|
|
43
43
|
"@vectorstores/env": "0.1.0"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|