



Elasticsearch and Lucene's implementation of RaBitQ algorithm for 1-bit vector quantization, renamed as BBQ. Provides 32x compression with asymptotically optimal error bounds, enabling efficient vector search at massive scale with minimal accuracy loss.
Loading more......
BBQ (derived from RaBitQ) is Elasticsearch and Lucene's implementation of 1-bit binary quantization for vector search, providing extreme compression while maintaining search accuracy through mathematical guarantees.
BBQ is Elasticsearch's adaptation of the RaBitQ algorithm with minor modifications for integration with Lucene's HNSW implementation. The algorithm was developed by researchers at NTU and adopted by major search platforms.
Normalization:
Random Rotation:
Sign Extraction:
Corrective Factors:
Query Quantization:
Hamming Distance:
Distance Estimation:
Reranking (optional):
GET /my-index/_search
{
"knn": {
"field": "vector",
"query_vector": [...],
"k": 10,
"num_candidates": 100
}
}
PUT /my-index
{
"mappings": {
"properties": {
"vector": {
"type": "dense_vector",
"dims": 1024,
"index": true,
"similarity": "cosine",
"index_options": {
"type": "hnsw",
"m": 16,
"ef_construction": 100
},
"quantization": {
"type": "bbq"
}
}
}
}
}
Based on RaBitQ research from NTU (National Taiwan University):
Available in: