mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-06-19 09:16:45 +00:00
remove fuzzy field because it is actually not used in current stage
This commit is contained in:
parent
db2aca1b2f
commit
830ed11ead
3 changed files with 4 additions and 16 deletions
|
|
@ -234,7 +234,6 @@ fn term_or_phrase(inp: &str) -> IResult<&str, UserInputLeaf> {
|
|||
delimiter,
|
||||
slop,
|
||||
prefix,
|
||||
fuzzy: None,
|
||||
}
|
||||
.into()
|
||||
},
|
||||
|
|
@ -254,7 +253,6 @@ fn term_or_phrase_infallible(inp: &str) -> JResult<&str, Option<UserInputLeaf>>
|
|||
delimiter,
|
||||
slop,
|
||||
prefix,
|
||||
fuzzy: None,
|
||||
}
|
||||
.into(),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -136,12 +136,6 @@ pub struct UserInputLiteral {
|
|||
pub delimiter: Delimiter,
|
||||
pub slop: u32,
|
||||
pub prefix: bool,
|
||||
/// Reserved for future use. Currently not used.
|
||||
/// Fuzzy matching is now determined at query parse time based on slop and tokenization:
|
||||
/// - If slop > 0 and tokenization produces a single term, it becomes a FuzzyTermQuery.
|
||||
/// - If slop > 0 and tokenization produces multiple terms, it remains a PhraseQuery with slop.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub fuzzy: Option<u8>,
|
||||
}
|
||||
|
||||
impl fmt::Debug for UserInputLiteral {
|
||||
|
|
@ -357,7 +351,6 @@ mod tests {
|
|||
delimiter: Delimiter::None,
|
||||
slop: 0,
|
||||
prefix: false,
|
||||
fuzzy: None,
|
||||
};
|
||||
let ast = UserInputAst::Leaf(Box::new(UserInputLeaf::Literal(literal)));
|
||||
let json = serde_json::to_string(&ast).unwrap();
|
||||
|
|
@ -423,7 +416,8 @@ mod tests {
|
|||
phrase: "hello".to_string(),
|
||||
delimiter: Delimiter::None,
|
||||
slop: 0,
|
||||
prefix: false, fuzzy: None, }))),
|
||||
prefix: false,
|
||||
}))),
|
||||
),
|
||||
])),
|
||||
2.5.into(),
|
||||
|
|
@ -449,7 +443,8 @@ mod tests {
|
|||
phrase: "hello".to_string(),
|
||||
delimiter: Delimiter::None,
|
||||
slop: 0,
|
||||
prefix: false, fuzzy: None, }))),
|
||||
prefix: false,
|
||||
}))),
|
||||
),
|
||||
]);
|
||||
let json = serde_json::to_string(&clause).unwrap();
|
||||
|
|
|
|||
|
|
@ -984,7 +984,6 @@ pub mod tests {
|
|||
delimiter: crate::query_grammar::Delimiter::None,
|
||||
slop: 0,
|
||||
prefix: false,
|
||||
fuzzy: None,
|
||||
};
|
||||
assert_eq!(get_doc_ids(user_input_literal), vec![DocAddress::new(0, 0)]);
|
||||
}
|
||||
|
|
@ -995,7 +994,6 @@ pub mod tests {
|
|||
delimiter: crate::query_grammar::Delimiter::None,
|
||||
slop: 0,
|
||||
prefix: false,
|
||||
fuzzy: None,
|
||||
};
|
||||
assert_eq!(get_doc_ids(user_input_literal), vec![DocAddress::new(0, 0)]);
|
||||
}
|
||||
|
|
@ -1006,7 +1004,6 @@ pub mod tests {
|
|||
delimiter: crate::query_grammar::Delimiter::None,
|
||||
slop: 0,
|
||||
prefix: false,
|
||||
fuzzy: None,
|
||||
};
|
||||
assert_eq!(get_doc_ids(user_input_literal), vec![DocAddress::new(0, 0)]);
|
||||
}
|
||||
|
|
@ -1017,7 +1014,6 @@ pub mod tests {
|
|||
delimiter: crate::query_grammar::Delimiter::None,
|
||||
slop: 0,
|
||||
prefix: false,
|
||||
fuzzy: None,
|
||||
};
|
||||
assert_eq!(get_doc_ids(user_input_literal), vec![DocAddress::new(0, 0)]);
|
||||
}
|
||||
|
|
@ -1028,7 +1024,6 @@ pub mod tests {
|
|||
delimiter: crate::query_grammar::Delimiter::None,
|
||||
slop: 0,
|
||||
prefix: false,
|
||||
fuzzy: None,
|
||||
};
|
||||
assert_eq!(get_doc_ids(user_input_literal), vec![DocAddress::new(0, 0)]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue