mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 04:17:10 +02:00
update tests
This commit is contained in:
parent
4986adc186
commit
ce8e12c7c5
6 changed files with 68 additions and 32 deletions
|
@ -93,11 +93,7 @@ impl DataInner {
|
|||
let frequency: HashMap<_, _> = fields_frequency
|
||||
.into_iter()
|
||||
.filter_map(|(a, c)| {
|
||||
if let Some(name) = schema.name(a) {
|
||||
return Some((name.to_string(), c));
|
||||
} else {
|
||||
return None;
|
||||
}
|
||||
schema.name(a).map(|name| (name.to_string(), c))
|
||||
})
|
||||
.collect();
|
||||
|
||||
|
|
|
@ -302,7 +302,7 @@ impl<'a> SearchBuilder<'a> {
|
|||
Err(err) => error!("Error during criteria builder; {:?}", err),
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
builder.push(DocumentId);
|
||||
return Ok(Some(builder.build()));
|
||||
|
@ -416,7 +416,7 @@ fn calculate_matches(
|
|||
if !attributes_to_retrieve.contains(attribute) {
|
||||
continue;
|
||||
}
|
||||
};
|
||||
}
|
||||
if !schema.displayed_name().contains(attribute) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ pub fn main() -> Result<(), MainError> {
|
|||
let data = Data::new(opt.clone());
|
||||
|
||||
if env::var("MEILI_NO_ANALYTICS") == Err(NotPresent) {
|
||||
thread::spawn(|| analytics::analytics_sender());
|
||||
thread::spawn(analytics::analytics_sender);
|
||||
}
|
||||
|
||||
let data_cloned = data.clone();
|
||||
|
|
|
@ -82,8 +82,8 @@ pub async fn get_all(ctx: Request<Data>) -> SResult<Response> {
|
|||
let settings = Settings {
|
||||
ranking_rules: Some(ranking_rules),
|
||||
ranking_distinct: Some(ranking_distinct),
|
||||
searchable_attributes: searchable_attributes,
|
||||
displayed_attributes: displayed_attributes,
|
||||
searchable_attributes,
|
||||
displayed_attributes,
|
||||
stop_words: Some(stop_words),
|
||||
synonyms: Some(synonyms),
|
||||
index_new_fields: Some(index_new_fields),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue