Skip to content
Permalink
Browse files

fix(indexer): fix is_sorted in response flush away the request

  • Loading branch information...
hanxiao committed Sep 4, 2019
1 parent 201c27e commit 40849abc92b0fe263754712bcec34358cd10a55f
Showing with 0 additions and 5 deletions.
  1. +0 −3 gnes/service/encoder.py
  2. +0 −2 gnes/service/indexer.py
@@ -89,6 +89,3 @@ def _handler_train(self, msg: 'gnes_pb2.Message'):
@handler.register(gnes_pb2.Request.QueryRequest)
def _handler_search(self, msg: 'gnes_pb2.Message'):
self.embed_chunks_in_docs(msg.request.search.query, is_input_list=False)
self.logger.info(len(msg.request.search.query.chunks))
for c in msg.request.search.query.chunks:
self.logger.info(c.embedding)
@@ -76,8 +76,6 @@ def _handler_chunk_search(self, msg: 'gnes_pb2.Message'):
raise ServiceError(
'unsupported indexer, dont know how to use %s to handle this message' % self._model.__bases__)

# assume the chunk search will change the whatever sort order the message has
msg.response.search.is_sorted = False
results = self._model.query_and_score(msg.request.search.query.chunks, top_k=msg.request.search.top_k)
self._put_result_into_message(results, msg)

0 comments on commit 40849ab

Please sign in to comment.
You can’t perform that action at this time.