public class InMemoryRepository extends Object implements RepositoryStorable, RepositoryLifecycle
| Constructor and Description |
|---|
InMemoryRepository(EmbeddingModel embeddingModel) |
| Modifier and Type | Method and Description |
|---|---|
void |
delete(String... ids)
删除
|
void |
dropRepository()
注销仓库
|
boolean |
exists(String id)
是否存在
|
void |
initRepository()
初始化仓库
|
void |
insert(List<Document> documents)
插入
|
List<Document> |
search(QueryCondition condition)
检索
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsearchpublic InMemoryRepository(EmbeddingModel embeddingModel)
public void insert(List<Document> documents) throws IOException
RepositoryStorableinsert in interface RepositoryStorableIOExceptionpublic void initRepository()
RepositoryLifecycleinitRepository in interface RepositoryLifecyclepublic void dropRepository()
RepositoryLifecycledropRepository in interface RepositoryLifecyclepublic void delete(String... ids)
RepositoryStorabledelete in interface RepositoryStorablepublic boolean exists(String id)
RepositoryStorableexists in interface RepositoryStorablepublic List<Document> search(QueryCondition condition) throws IOException
Repositorysearch in interface Repositorycondition - 查询条件IOExceptionCopyright © 2025. All rights reserved.