Skip to content

Commit

Permalink
[APPEND][FSTORE-1135] Fix preview embedding in the UI when pk is not …
Browse files Browse the repository at this point in the history
…in the opensearch schema (#1765) (#1522)

(cherry picked from commit af7a7de)
  • Loading branch information
kennethmhc authored Apr 30, 2024
1 parent e21f878 commit d5bf5e6
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,12 @@ public void batchWrite(Index index, Map<String, String> data) throws VectorDatab
public List<Map<String, Object>> preview(Index index, Set<Field> fields, int n) throws VectorDatabaseException {
List<Map<String, Object>> results = Lists.newArrayList();

// If fields is empty, return no result, otherwise the search query matches any documents which may not
// belong to requested feature group.
if (fields.size() == 0) {
return results;
}

// Create a bool query
BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery();

Expand Down

0 comments on commit d5bf5e6

Please sign in to comment.