Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion faiss/IndexIVFFlat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ struct IVFFlatScanner : InvertedListScanner {
size_t d;

IVFFlatScanner(size_t d, bool store_pairs, const IDSelector* sel)
: InvertedListScanner(store_pairs, sel), d(d) {}
: InvertedListScanner(store_pairs, sel), d(d) {
keep_max = is_similarity_metric(metric);
}

const float* xi;
void set_query(const float* query) override {
Expand Down
1 change: 1 addition & 0 deletions faiss/IndexIVFPQ.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1199,6 +1199,7 @@ struct IVFPQScanner : IVFPQScannerT<idx_t, METRIC_TYPE, PQDecoder>,
precompute_mode(precompute_mode),
sel(sel) {
this->store_pairs = store_pairs;
this->keep_max = is_similarity_metric(METRIC_TYPE);
}

void set_query(const float* query) override {
Expand Down
1 change: 1 addition & 0 deletions faiss/IndexIVFSpectralHash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ struct IVFScanner : InvertedListScanner {
hc(qcode.data(), index->code_size) {
this->store_pairs = store_pairs;
this->code_size = index->code_size;
this->keep_max = is_similarity_metric(index->metric_type);
}

void set_query(const float* query) override {
Expand Down
1 change: 1 addition & 0 deletions faiss/impl/ScalarQuantizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1231,6 +1231,7 @@ struct IVFSQScannerIP : InvertedListScanner {
this->store_pairs = store_pairs;
this->sel = sel;
this->code_size = code_size;
this->keep_max = true;
}

void set_query(const float* query) override {
Expand Down