Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

Commit

Permalink
fix(indexer): fix is_sorted in response flush away the request
Browse files Browse the repository at this point in the history
  • Loading branch information
hanhxiao committed Sep 4, 2019
1 parent 201c27e commit 40849ab
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
3 changes: 0 additions & 3 deletions gnes/service/encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 0 additions & 2 deletions gnes/service/indexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 40849ab

Please sign in to comment.