Skip to content

Commit

Permalink
refactor: address comments 2
Browse files Browse the repository at this point in the history
Signed-off-by: Stepan Bagritsevich <[email protected]>
  • Loading branch information
BagritsevichStepan committed Dec 11, 2024
1 parent 814965b commit 51c70c7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/server/search/aggregator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,7 @@ void Aggregator::DoSort(std::string_view field, bool descending) {
if (l_it->second < r_it->second) {
return !descending;
}
if (l_it->second > r_it->second) {
return descending;
}
return true; // Elements are equal
return descending; // l_it->second >= r_it->second
};

std::sort(result.values.begin(), result.values.end(), std::move(comparator));
Expand Down

0 comments on commit 51c70c7

Please sign in to comment.