def METHOD_NAME(self, index_path: str = None):
    if not index_path:
        index_path = os.path.join(self.model.model_dir,
                                  'passages_index.json')
    with open(index_path) as f:
        passage_index = json.load(f)
    self.passages_index = passage_index
    self.passages = [x['passage'] for x in passage_index]
    all_ctx_vector = np.array([x['vector']
                               for x in passage_index]).astype('float32')
    index = faiss.IndexFlatIP(all_ctx_vector.shape[-1])
    index.add(all_ctx_vector)
    self.index = index