From 137434a1c83744a5f4ce19c933388d43fa5d1371 Mon Sep 17 00:00:00 2001 From: ManyTheFish Date: Mon, 16 May 2022 17:05:20 +0200 Subject: [PATCH] Add some implementation on MatchBounds --- milli/src/search/matches/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/milli/src/search/matches/mod.rs b/milli/src/search/matches/mod.rs index c7812aa77..d89e7dcb6 100644 --- a/milli/src/search/matches/mod.rs +++ b/milli/src/search/matches/mod.rs @@ -3,6 +3,7 @@ use std::borrow::Cow; use matching_words::{MatchType, PartialMatch, PrimitiveWordId}; pub use matching_words::{MatchingWord, MatchingWords}; use meilisearch_tokenizer::token::{SeparatorKind, Token}; +use serde::Serialize; pub mod matching_words; @@ -86,7 +87,7 @@ pub struct Match { token_position: usize, } -#[derive(Clone, Debug)] +#[derive(Serialize, Debug, Clone, PartialEq)] pub struct MatchBounds { pub start: usize, pub length: usize,