class_docstr: Efficient index for retrieval. Note: default settings are for hugh accuracy but also high RAM usage
class_docstr_tok: ["Efficient","index","for","retrieval",".","Note",":","default","settings","are","for","hugh","accuracy","but","also","high","RAM","usage"]
code: def __init__(
      self,
      vector_sz: int,
      buffer_size: int = 50000,
      store_n: int = 128,
      ef_search: int = 256,
      ef_construction: int = 200,
  ):
      super(DenseHNSWFlatIndexer, self).__init__(
          buffer_size=buffer_size
      )
  
      index = faiss.IndexHNSWFlat(
          vector_sz, store_n, faiss.METRIC_INNER_PRODUCT
      )
      index.hnsw.efSearch = ef_search
      index.hnsw.efConstruction = ef_construction
      self.index = index
  
imports: import os
  import logging
  import pickle
  import faiss
  import numpy
label_desc: Use image node_id 1 to create a new DenseHNSWFlatIndexer object from inherited base classes: DenseIndexer with example: obj = DenseHNSWFlatIndexer(vector_sz, buffer_size, store_n, ef_search, ef_construction)