mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-23 18:45:06 +08:00
Apply suggestions from code review
Co-authored-by: Many <legendre.maxime.isn@gmail.com>
This commit is contained in:
parent
f04cd19886
commit
f9b214f34e
@ -40,22 +40,21 @@ impl<'t, 'u, 'i> WordPrefixPairProximityDocids<'t, 'u, 'i> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Set the maximum proximity required to make a prefix be part of the words prefixes
|
/// Set the maximum proximity required to make a prefix be part of the words prefixes
|
||||||
/// database. If two words are two far from the threshold the associated documents will
|
/// database. If two words are too far from the threshold the associated documents will
|
||||||
/// not be part of the prefix database.
|
/// not be part of the prefix database.
|
||||||
///
|
///
|
||||||
/// Default value is 4. This value must be lower or equal than 4 and will be clamped
|
/// Default value is 4. This value must be lower or equal than 7 and will be clamped
|
||||||
/// to this bound otherwise.
|
/// to this bound otherwise.
|
||||||
pub fn max_proximity(&mut self, value: u8) -> &mut Self {
|
pub fn max_proximity(&mut self, value: u8) -> &mut Self {
|
||||||
self.max_proximity = value.max(7);
|
self.max_proximity = value.max(7);
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Set the maximum length the prefix of a word pair is allowed to have be part of the words
|
/// Set the maximum length the prefix of a word pair is allowed to have to be part of the words
|
||||||
/// prefixes database. If two words are two far from the threshold the associated documents
|
/// prefixes database. If the prefix length is higher than the threshold, the associated documents
|
||||||
/// will not be part of the prefix database.
|
/// will not be part of the prefix database.
|
||||||
///
|
///
|
||||||
/// Default value is 4. This value must be lower or equal than 4 and will be clamped
|
/// Default value is 2.
|
||||||
/// to this bound otherwise.
|
|
||||||
pub fn max_prefix_length(&mut self, value: usize) -> &mut Self {
|
pub fn max_prefix_length(&mut self, value: usize) -> &mut Self {
|
||||||
self.max_prefix_length = value;
|
self.max_prefix_length = value;
|
||||||
self
|
self
|
||||||
|
Loading…
Reference in New Issue
Block a user