Skip to content

Search records with offset doesn't consider offset #472

@Nulhiedbriks

Description

@Nulhiedbriks

Describe the bug:
I am trying to retrieve records by adding an offset to ignore the first N results.
I get the same list of results regardless of the offset i set.

Steps to reproduce:
here the console.log before sending the request

/dist/milvus/grpc/Data.js 

...
console.log(params);
const originSearchResult = yield (0, __1.promisify)(this.channelPool, isHybridSearch ? 'HybridSearch' : 'Search', request, params.timeout || this.timeout);
...

When offset is 0

{
  collection_name: 'person',
  data: [ { '0': 1, '30': 1 } ],
  limit: 100,
  topk: 100,
  anns_field: 'best_match_filter_vector',
  params: { metric_type: 'IP' },
  consistency_level: 'Bounded',
  offset: 0,     
  timeout: 180000,
  filter: "dbname == 'X' and s_status != 4",
  output_fields: [
    'id'
  ]
}
Results ids : ['@I110@', '@I1102@'...]

When offset is not 0 (in my case it's 100/200/300...)

{
  collection_name: 'person',
  data: [ { '0': 1, '30': 1 } ],
  limit: 100,
  topk: 100,
  anns_field: 'best_match_filter_vector',
  params: { metric_type: 'IP' },
  consistency_level: 'Bounded',
  offset: 100,     
  timeout: 180000,
  filter: "dbname == 'X' and s_status != 4",
  output_fields: [
    'id'
  ]
}
Results ids : ['@I110@', '@I1102@'...]

Another thing to consider is that all my records return the same score (and it's intended) , maybe it can help to identify the problem. (Maybe the offset not work well on same score results ?)

Do you need more informations ?

Milvus-node-sdk version: 2.5.12

Milvus version: 2.5.18

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions