Package org.apache.lucene.sandbox.codecs.dedup


package org.apache.lucene.sandbox.codecs.dedup
De-duplicating HNSW vector formats.

Stores each distinct vector once and shares it across the documents and fields that reference it, while reusing the Lucene 9.9 HNSW graph. Two formats are provided:

  • DedupHnswVectorsFormat stores and scores raw vectors; see DedupFlatVectorsFormat for the on-disk layout.
  • DedupHnswScalarQuantizedVectorsFormat additionally stores a scalar quantized copy of each distinct FLOAT32 vector, used for scoring; see DedupScalarQuantizedVectorsFormat for the on-disk layout.