Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static void initEmbeddingModel() {

@Override
protected void clearStore() {
embeddingStore.deleteAll();
embeddingStore.removeAll();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -158,8 +159,14 @@ public EmbeddingSearchResult<TextSegment> search(EmbeddingSearchRequest request)
}).filter(Objects::nonNull).collect(Collectors.toList()));
}

public void deleteAll() {
remoteCache.clearAsync();
@Override
public void removeAll(Collection<String> ids) {
ids.forEach(id -> remoteCache.remove(id));
}

@Override
public void removeAll() {
remoteCache.clear();
}

public static class Builder {
Expand Down
Loading