Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
fix(service): fix bug in doc_type name in indexer service
  • Loading branch information
Larryjianfeng committed Jul 26, 2019
1 parent d834f57 commit 1c3bb01a2c87717d3a342c86a65592ea78ad717d
Showing with 3 additions and 3 deletions.
  1. +3 −3 gnes/service/indexer.py
@@ -39,11 +39,11 @@ def _handler_index(self, msg: 'gnes_pb2.Message'):
if len(d.chunks):
all_vecs.append(blob2array(d.chunk_embeddings))
doc_ids += [d.doc_id] * len(d.chunks)
if d.doc_type == 'TEXT':
if d.doc_type == gnes_pb2.Document.TEXT:
offsets += [c.offset_1d for c in d.chunks]
elif d.doc_type == 'IMAGE':
elif d.doc_type == gnes_pb2.Document.IMAGE:
offsets += [c.offset_nd for c in d.chunks]
elif d.doc_type == 'VIDEO':
elif d.doc_type == gnes_pb2.Document.VIDEO:
offsets += [c.offset_1d for c in d.chunks]
weights += [c.weight for c in d.chunks]

0 comments on commit 1c3bb01

Please sign in to comment.