From faf0dd2f445a528423e773fb5611ccd53f06e55a Mon Sep 17 00:00:00 2001 From: qdequele Date: Mon, 27 Jan 2020 18:25:42 +0100 Subject: [PATCH] do not show matches on undesired fields --- meilisearch-http/src/helpers/meilisearch.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meilisearch-http/src/helpers/meilisearch.rs b/meilisearch-http/src/helpers/meilisearch.rs index 74a8ed2df..563823423 100644 --- a/meilisearch-http/src/helpers/meilisearch.rs +++ b/meilisearch-http/src/helpers/meilisearch.rs @@ -404,6 +404,9 @@ fn calculate_matches( continue; } }; + if !schema.get_displayed_name().contains(attribute.as_str()) { + continue; + } if let Some(pos) = matches_result.get_mut(&attribute) { pos.push(MatchPosition { start: m.char_index as usize,