diff --git a/milli/src/search/criteria/exactness.rs b/milli/src/search/criteria/exactness.rs
index b1026ccc2..7f27287b7 100644
--- a/milli/src/search/criteria/exactness.rs
+++ b/milli/src/search/criteria/exactness.rs
@@ -162,11 +162,11 @@ fn resolve_state(
use State::*;
match state {
ExactAttribute(mut allowed_candidates) => {
- let query_len = query.len() as u32;
+ let query_len = query.len() as u8;
let mut candidates = RoaringBitmap::new();
let attributes_ids = ctx.searchable_fields_ids()?;
for id in attributes_ids {
- if let Some(attribute_allowed_docids) = ctx.field_id_len_docids(id, query_len)? {
+ if let Some(attribute_allowed_docids) = ctx.field_id_word_count_docids(id, query_len)? {
let mut attribute_candidates_array = attribute_start_with_docids(ctx, id as u32, query)?;
attribute_candidates_array.push(attribute_allowed_docids);
candidates |= intersection_of(attribute_candidates_array.iter().collect());
diff --git a/milli/src/search/criteria/mod.rs b/milli/src/search/criteria/mod.rs
index 99e4a4209..456d16e1a 100644
--- a/milli/src/search/criteria/mod.rs
+++ b/milli/src/search/criteria/mod.rs
@@ -78,7 +78,7 @@ pub trait Context<'c> {
fn word_position_last_level(&self, word: &str, in_prefix_cache: bool) -> heed::Result