From 4977aa3cf5e247c967c7b5d0729916fa69cc0381 Mon Sep 17 00:00:00 2001 From: Jem Date: Fri, 19 Jul 2019 13:38:02 +0800 Subject: [PATCH] fix(vector indexer): reorder relevance and chunk weight --- gnes/service/indexer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnes/service/indexer.py b/gnes/service/indexer.py index 7322ae44..928cf960 100644 --- a/gnes/service/indexer.py +++ b/gnes/service/indexer.py @@ -61,7 +61,7 @@ def _handler_chunk_search(self, msg: 'gnes_pb2.Message'): results = self._model.query(vecs, top_k=msg.request.search.top_k) q_weights = [qc.weight for qc in msg.request.search.query.chunks] for all_topks, qc_weight in zip(results, q_weights): - for _doc_id, _offset, _relevance, _weight in all_topks: + for _doc_id, _offset, _weight, _relevance in all_topks: r = msg.response.search.topk_results.add() r.chunk.doc_id = _doc_id r.chunk.offset_1d = _offset