denselinkage.indexing.FaissFlatIndex

class denselinkage.indexing.FaissFlatIndex(*args, **kwargs)[source]

Bases: VectorIndex

FAISS-backed reference index spec — exact (flat) inner-product search (extra: [faiss]).

build is a factory: it returns a fresh populated FaissSearchableIndex and mutates neither self nor its arguments, so one spec safely builds many artifacts. Uses faiss.IndexFlatIP (inner product, not L2) so that for the L2-normalized vectors the embedders produce the score equals cosine — keeping similarity_threshold semantics identical to NumpyFlatIndex.