mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-10 11:07:06 +00:00
(improvement)(Headless) Fix the null pointer exception in metadata put. (#922)
This commit is contained in:
@@ -137,7 +137,10 @@ public class InMemoryS2EmbeddingStore implements S2EmbeddingStore {
|
||||
retrieval.setId(embeddingMatch.embeddingId());
|
||||
retrieval.setQuery(embeddingMatch.embedded().getQuery());
|
||||
Map<String, Object> metadata = new HashMap<>();
|
||||
if (Objects.nonNull(embeddingMatch.embedded())
|
||||
&& MapUtils.isNotEmpty(embeddingMatch.embedded().getMetadata())) {
|
||||
metadata.putAll(embeddingMatch.embedded().getMetadata());
|
||||
}
|
||||
if (filterRetrieval(filterCondition, metadata)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user