Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
MBkkt committed Nov 30, 2023
1 parent c755c63 commit 39b22c8
Show file tree
Hide file tree
Showing 3 changed files with 124 additions and 196 deletions.
4 changes: 2 additions & 2 deletions core/search/min_match_disjunction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ class MinMatchDisjunction : public doc_iterator,
// greater than required min_match. All matched iterators points
// to current matched document after this call.
// Returns total matched iterators count.
size_t MatchCount() {
size_t match_count() {
PushValidToLead();
return lead_;
}
Expand All @@ -233,7 +233,7 @@ class MinMatchDisjunction : public doc_iterator,

// score lead iterators
std::memset(res, 0, static_cast<Merger&>(self).byte_size());
std::for_each(self.lead(), self.heap_.end(), [&self, res](size_t it) {
std::for_each(self.Lead(), self.heap_.end(), [&self, res](size_t it) {
IRS_ASSERT(it < self.itrs_.size());
if (auto& score = *self.itrs_[it].score; !score.IsDefault()) {
auto& merger = static_cast<Merger&>(self);
Expand Down
6 changes: 3 additions & 3 deletions core/search/ngram_similarity_query.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class NGramApprox<true> : public Conjunction<CostAdapter<>, NoopAggregator> {
}(std::move(itrs))},
match_count_{min_match_count} {}

size_t MatchCount() const noexcept { return match_count_; }
size_t match_count() const noexcept { return match_count_; }

private:
size_t match_count_;
Expand Down Expand Up @@ -493,7 +493,7 @@ class NGramSimilarityDocIterator : public doc_iterator, private score_ctx {

bool next() final {
while (approx_.next()) {
if (checker_.Check(approx_.MatchCount(), value())) {
if (checker_.Check(approx_.match_count(), value())) {
return true;
}
}
Expand All @@ -513,7 +513,7 @@ class NGramSimilarityDocIterator : public doc_iterator, private score_ctx {
const auto doc_id = approx_.seek(target);

if (doc_limits::eof(doc_id) ||
checker_.Check(approx_.MatchCount(), doc->value)) {
checker_.Check(approx_.match_count(), doc->value)) {
return doc_id;
}

Expand Down
Loading

0 comments on commit 39b22c8

Please sign in to comment.