Take attributes to search in into account

This commit is contained in:
Clément Renault
2019-11-12 18:25:33 +01:00
parent 6803a8fad0
commit 5c5f41d755
2 changed files with 7 additions and 1 deletions

View File

@ -131,6 +131,12 @@ impl<'a> SearchBuilder<'a> {
self
}
pub fn add_attribute_to_search_in(&mut self, value: String) -> &SearchBuilder {
let attributes_to_search_in = self.attributes_to_search_in.get_or_insert(HashSet::new());
attributes_to_search_in.insert(value);
self
}
pub fn attributes_to_highlight(&mut self, value: HashSet<String>) -> &SearchBuilder {
self.attributes_to_highlight = Some(value);
self