mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-01-25 12:47:28 +01:00
fix typos
This commit is contained in:
parent
86270e6878
commit
95f8e21533
@ -897,9 +897,9 @@ fn format_fields<'a>(
|
|||||||
let mut matches_position = compute_matches.then(BTreeMap::new);
|
let mut matches_position = compute_matches.then(BTreeMap::new);
|
||||||
let mut document = document.clone();
|
let mut document = document.clone();
|
||||||
|
|
||||||
// reduce the formated option list to the attributes that should be formatted,
|
// reduce the formatted option list to the attributes that should be formatted,
|
||||||
// instead of all the attribute to display.
|
// instead of all the attributes to display.
|
||||||
let formating_fields_options: Vec<_> = formatted_options
|
let formatting_fields_options: Vec<_> = formatted_options
|
||||||
.iter()
|
.iter()
|
||||||
.filter(|(_, option)| option.should_format())
|
.filter(|(_, option)| option.should_format())
|
||||||
.map(|(fid, option)| (field_ids_map.name(*fid).unwrap(), option))
|
.map(|(fid, option)| (field_ids_map.name(*fid).unwrap(), option))
|
||||||
@ -913,10 +913,10 @@ fn format_fields<'a>(
|
|||||||
// to the value and merge them together. eg. If a user said he wanted to highlight `doggo`
|
// to the value and merge them together. eg. If a user said he wanted to highlight `doggo`
|
||||||
// and crop `doggo.name`. `doggo.name` needs to be highlighted + cropped while `doggo.age` is only
|
// and crop `doggo.name`. `doggo.name` needs to be highlighted + cropped while `doggo.age` is only
|
||||||
// highlighted.
|
// highlighted.
|
||||||
// Warn: The time to compute the `format` list scales with the number of field to format;
|
// Warn: The time to compute the format list scales with the number of fields to format;
|
||||||
// cummulated with `map_leaf_values` that iterates over all the nested fields, it gives a quadratic complexity:
|
// cumulated with map_leaf_values that iterates over all the nested fields, it gives a quadratic complexity:
|
||||||
// `d*f` where `d` is the total number of field to display and `f` the total number of field to format.
|
// d*f where d is the total number of fields to display and f is the total number of fields to format.
|
||||||
let format = formating_fields_options
|
let format = formatting_fields_options
|
||||||
.iter()
|
.iter()
|
||||||
.filter(|(name, _option)| {
|
.filter(|(name, _option)| {
|
||||||
milli::is_faceted_by(name, key) || milli::is_faceted_by(key, name)
|
milli::is_faceted_by(name, key) || milli::is_faceted_by(key, name)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user