class_docstr: Top-Level Indexer.
  
  Provides an interface for interacting with FAISS Indexes.
docstr: Search FAISS index.
  
  :param query_vectors:
      query vectors into the index
  :param top_docs:
      number of docs to return
  
  :return top_docs:
      returns, for each query vector:
          a list of document ids (according to db),
          a list of reconstructed document vectors
docstr_tok: ["Search","FAISS","index",".",":","param","query_vectors",":","query","vectors","into","the","index",":","param","top_docs",":","number","of","docs","to","return",":","return","top_docs",":","returns",",","for","each","query","vector",":","a","list","of","document","ids","(","according","to","db",")",",","a","list","of","reconstructed","document","vectors"]
code: def search(
      self, query_vectors: np.array, top_docs: int
  ) -> List[Tuple[List[int], List[np.array]]]:
      """
      Search FAISS index.
  
      :param query_vectors:
          query vectors into the index
      :param top_docs:
          number of docs to return
  
      :return top_docs:
          returns, for each query vector:
              a list of document ids (according to db),
              a list of reconstructed document vectors
      """
      query_vectors = self.get_search_vectors(query_vectors)
      logging.debug(f"query_vectors {query_vectors.shape}")
      _scores, indexes, vectors = self.index.search_and_reconstruct(
          query_vectors, top_docs
      )
      db_ids = [
          [self.index_id_to_db_id[i] for i in query_top_idxs]
          for query_top_idxs in indexes
      ]
      result = [(db_ids[i], vectors[i]) for i in range(len(db_ids))]
      return result
  
imports: from parlai.core.build_data import modelzoo_path
  from parlai.core.opt import Opt
  import parlai.utils.logging
  from abc import ABC, abstractmethod
  import math
  import numpy
  import os
  import random
  import time
  import torch
  import torch.cuda
  from typing import List, Tuple, Optional
  from parlai.agents.rag.args import WIKIPEDIA_COMPRESSED_INDEX, WIKIPEDIA_EXACT_INDEX
label_desc: Use image node_id 4 for calling the BaseIndexer obj's underlying member method code with example usage: obj.search(query_vectors, top_docs) and returns: result