OpenSearch 向量存储
🌐 OpenSearch Vector Store
OpenSearchVector 类提供使用 OpenSearch 的向量搜索功能,OpenSearch 是一个开源的搜索和分析引擎。它利用 OpenSearch 的 k-NN 功能来执行向量相似性搜索。
🌐 The OpenSearchVector class provides vector search using OpenSearch, an open-source search and analytics engine. It uses OpenSearch's k-NN capabilities to perform vector similarity search.
构造函数选项Direct link to 构造函数选项
🌐 Constructor Options
构造函数接受所有 OpenSearch ClientOptions 选项,并且需要一个必填的 id 字段。
🌐 The constructor accepts all OpenSearch ClientOptions plus a required id field.
id:
node:
auth?:
ssl?:
compression?:
方法Direct link to 方法
🌐 Methods
createIndex()Direct link to createIndex()
使用指定的配置创建一个新索引。
🌐 Creates a new index with the specified configuration.
indexName:
dimension:
metric?:
listIndexes()Direct link to listIndexes()
列出 OpenSearch 实例中的所有索引。
🌐 Lists all indexes in the OpenSearch instance.
返回:Promise<string[]>
🌐 Returns: Promise<string[]>
describeIndex()Direct link to describeIndex()
获取有关索引的信息。
🌐 Gets information about an index.
indexName:
deleteIndex()Direct link to deleteIndex()
indexName:
upsert()Direct link to upsert()
indexName:
vectors:
metadata?:
ids?:
query()Direct link to query()
indexName:
queryVector:
topK?:
filter?:
updateVector()Direct link to updateVector()
通过 ID 或元数据过滤器更新单个向量。必须提供 id 或 filter 中的一个,但不能同时提供两者。
🌐 Update a single vector by ID or by metadata filter. Either id or filter must be provided, but not both.
indexName:
id?:
filter?:
update:
deleteVector()Direct link to deleteVector()
根据 ID 从索引中删除单个向量。
🌐 Deletes a single vector by its ID from the index.
indexName:
id:
deleteVectors()Direct link to deleteVectors()
通过 ID 或元数据过滤器删除多个向量。必须提供 ids 或 filter 中的一个,但不能同时提供两者。
🌐 Delete multiple vectors by IDs or by metadata filter. Either ids or filter must be provided, but not both.
indexName:
ids?:
filter?:
相关Direct link to 相关
🌐 Related