mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-22 21:04:27 +01:00
fix: Filter and count the exact matching words
This commit is contained in:
parent
c594597a01
commit
0d07af3caf
@ -9,13 +9,13 @@ use crate::database::DatabaseView;
|
||||
use crate::Match;
|
||||
|
||||
#[inline]
|
||||
fn contains_exact(matches: &[Match]) -> bool {
|
||||
fn contains_exact(matches: &&[Match]) -> bool {
|
||||
matches.iter().any(|m| m.is_exact)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn number_exact_matches(matches: &Matches) -> usize {
|
||||
matches.query_index_groups().map(contains_exact).count()
|
||||
matches.query_index_groups().filter(contains_exact).count()
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
|
Loading…
Reference in New Issue
Block a user