class_docstr: Simple indexer class
class_docstr_tok: ["Simple","indexer","class"]
code: def search(self, docs: DocumentArray, parameters: Dict, **kwargs):
      top_k = int(parameters.get("top_k", 1))
      a = np.stack(docs[:, "embedding"])
      b = np.stack(self._docs[:, "embedding"])
      q_emb = _ext_A(_norm(a))
      d_emb = _ext_B(_norm(b))
      dists = _cosine(q_emb, d_emb)
      idx, dist = self._get_sorted_top_k(dists, top_k)
      for _q, _ids, _dists in zip(docs, idx, dist):
          for _id, _dist in zip(_ids, _dists):
              d = Document(self._docs[int(_id)], copy=True)
              d.scores["cosine"].value = 1 - _dist
              _q.matches.append(d)
  
file_path: jina/tests/integration/crud/__init__.py
imports: import os
  from typing import Dict, Tuple
  import numpy
  from jina import Document, DocumentArray, Executor, requests
  from jina.logging.logger import JinaLogger
label_desc: Use image node_id 6 for calling the CrudIndexer obj's underlying member method code with example usage: obj.search(docs, parameters) without return types