class_docstr: 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
      )
  
      # IndexHNSWFlat supports L2 similarity only
      # so we have to apply DOT -> L2 similairy space conversion with the help of an extra dimension
      index = faiss.IndexHNSWFlat(vector_sz + 1, store_n)
      index.hnsw.efSearch = ef_search
      index.hnsw.efConstruction = ef_construction
      self.index = index
      self.phi = 0
  
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)