@Preview(value="3.1") public class TcVectorDbRepository extends java.lang.Object implements RepositoryStorable, RepositoryLifecycle
| 限定符和类型 | 类和说明 |
|---|---|
static class |
TcVectorDbRepository.Builder
VectorDBRepository 构建器
|
| 限定符和类型 | 字段和说明 |
|---|---|
static java.lang.String |
TEXT_FIELD_NAME
文本字段名
|
static java.lang.String |
VECTOR_FIELD_NAME
向量字段名
|
| 限定符和类型 | 方法和说明 |
|---|---|
static TcVectorDbRepository.Builder |
builder(com.tencent.tcvectordb.client.VectorDBClient client)
创建构建器
|
void |
deleteById(java.lang.String... ids)
删除文档
|
void |
dropRepository()
注销仓库
|
boolean |
existsById(java.lang.String id)
检查文档是否存在
|
void |
initRepository()
初始化仓库
|
void |
save(java.util.List<Document> documents,
java.util.function.BiConsumer<java.lang.Integer,java.lang.Integer> progressCallback)
批量存储文档(支持更新)
|
java.util.List<Document> |
search(QueryCondition condition)
搜索文档
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasyncInsert, asyncSave, delete, exists, insert, insert, insert, save, savesearchpublic static final java.lang.String TEXT_FIELD_NAME
public static final java.lang.String VECTOR_FIELD_NAME
public void initRepository()
initRepository 在接口中 RepositoryLifecyclepublic void dropRepository()
RepositoryLifecycledropRepository 在接口中 RepositoryLifecyclepublic void save(java.util.List<Document> documents, java.util.function.BiConsumer<java.lang.Integer,java.lang.Integer> progressCallback) throws java.io.IOException
save 在接口中 RepositoryStorabledocuments - 要存储的文档列表progressCallback - 进度回调java.io.IOException - 如果存储过程发生IO错误public void deleteById(java.lang.String... ids)
throws java.io.IOException
deleteById 在接口中 RepositoryStorableids - 要删除的文档IDjava.io.IOException - 如果删除过程发生IO错误public boolean existsById(java.lang.String id)
throws java.io.IOException
existsById 在接口中 RepositoryStorableid - 文档IDjava.io.IOException - 如果检查过程发生IO错误public java.util.List<Document> search(QueryCondition condition) throws java.io.IOException
search 在接口中 Repositorycondition - 查询条件java.io.IOException - 如果搜索过程发生IO错误public static TcVectorDbRepository.Builder builder(com.tencent.tcvectordb.client.VectorDBClient client)