Skip to content

Commit

Permalink
fix: search result shouldn't contain the copied 'id' column (#406)
Browse files Browse the repository at this point in the history
* fix: search result shouldn't contain the copied 'id' column

Signed-off-by: ryjiang <[email protected]>

* update

Signed-off-by: ryjiang <[email protected]>

---------

Signed-off-by: ryjiang <[email protected]>
  • Loading branch information
shanghaikid authored Jan 15, 2025
1 parent 625e61b commit 4ff9675
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions milvus/utils/Format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -937,16 +937,11 @@ export const formatSearchResult = (
const fieldsDataMap = buildFieldDataMap(fields_data, options.transformers);
// build output name array
const output_fields = [
'id',
...(!!searchRes.results.output_fields?.length
? searchRes.results.output_fields
: fields_data.map(f => f.field_name)),
];

// vector id support int / str id.
const idData = ids ? ids[ids.id_field]!.data : {};
// add id column
fieldsDataMap.set('id', idData as RowData[]);
// fieldsDataMap.set('score', scores); TODO: fieldDataMap to support formatter

/**
Expand Down

0 comments on commit 4ff9675

Please sign in to comment.