mirror of
				https://github.com/meilisearch/meilisearch.git
				synced 2025-11-04 01:46:28 +00:00 
			
		
		
		
	Increase position by 8 on hard separator when building query terms
This commit is contained in:
		@@ -907,7 +907,7 @@ pub fn located_query_terms_from_string(
 | 
			
		||||
            TokenKind::Separator(separator_kind) => {
 | 
			
		||||
                match separator_kind {
 | 
			
		||||
                    SeparatorKind::Hard => {
 | 
			
		||||
                        position += 1;
 | 
			
		||||
                        position += 8;
 | 
			
		||||
                    }
 | 
			
		||||
                    SeparatorKind::Soft => {
 | 
			
		||||
                        position += 0;
 | 
			
		||||
 
 | 
			
		||||
@@ -153,7 +153,7 @@ fn json_to_string<'a>(value: &'a Value, buffer: &'a mut String) -> Option<&'a st
 | 
			
		||||
 | 
			
		||||
/// take an iterator on tokens and compute their relative position depending on separator kinds
 | 
			
		||||
/// if it's an `Hard` separator we add an additional relative proximity of 8 between words,
 | 
			
		||||
/// else we keep the standart proximity of 1 between words.
 | 
			
		||||
/// else we keep the standard proximity of 1 between words.
 | 
			
		||||
fn process_tokens<'a>(
 | 
			
		||||
    tokens: impl Iterator<Item = Token<'a>>,
 | 
			
		||||
) -> impl Iterator<Item = (usize, Token<'a>)> {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user