mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-11-30 02:48:45 +08:00
enhance: fix copying hits of inverted index twice (#33968)
issue: https://github.com/milvus-io/milvus/issues/29793 The custom `VecCollector` have already transformed the results into vector of offsets, no need to copy them twice. Signed-off-by: longjiquan <jiquan.long@zilliz.com>
This commit is contained in:
parent
5fac2fa1d2
commit
7b9462c0d3
@ -56,11 +56,7 @@ impl IndexReaderWrapper {
|
||||
fn search(&self, q: &dyn Query) -> Vec<u32> {
|
||||
let searcher = self.reader.searcher();
|
||||
let hits = searcher.search(q, &VecCollector).unwrap();
|
||||
let mut ret = Vec::with_capacity(hits.len());
|
||||
for address in hits {
|
||||
ret.push(address);
|
||||
}
|
||||
ret
|
||||
hits
|
||||
}
|
||||
|
||||
pub fn term_query_i64(&self, term: i64) -> Vec<u32> {
|
||||
|
Loading…
Reference in New Issue
Block a user