Skip to content

Commit

Permalink
refactor(tests): rename the indexer
Browse files Browse the repository at this point in the history
  • Loading branch information
nan-wang committed Apr 12, 2020
1 parent 533f71e commit 197e6bb
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion jina/executors/rankers/bi_match.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ class BiMatchRanker(BaseRanker):
D_MISS = 2000 # cost of a non-match chunk, used for normalization

def score(self, match_idx: 'np.ndarray', query_chunk_meta: Dict, match_chunk_meta: Dict) -> 'np.ndarray':
# match_idx columns, doc_id, matched_chunk_id, query_chunk_id
"""
:param match_idx: an `ndarray` of the size ``N x 4``. ``N`` is the batch size of the matched chunks for the
query doc. The columns correspond to the ``doc_id`` of the matched chunk, ``chunk_id`` of the matched chunk,
``chunk_id`` of the query chunk, and ``score`` of the matched chunk.
"""
# sort by doc_id
a = match_idx[match_idx[:, 0].argsort()]
# group by doc_id
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 197e6bb

Please sign in to comment.