mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-26 16:21:07 +00:00
fix for review
This commit is contained in:
@ -62,7 +62,7 @@ pub async fn search_with_url_query(ctx: Request<Data>) -> SResult<Response> {
|
||||
let crop_length = query.crop_length.unwrap_or(200);
|
||||
if attributes_to_crop == "*" {
|
||||
let attributes_to_crop = schema
|
||||
.get_displayed_name()
|
||||
.displayed_name()
|
||||
.iter()
|
||||
.map(|attr| (attr.to_string(), crop_length))
|
||||
.collect();
|
||||
@ -78,11 +78,15 @@ pub async fn search_with_url_query(ctx: Request<Data>) -> SResult<Response> {
|
||||
|
||||
if let Some(attributes_to_highlight) = query.attributes_to_highlight {
|
||||
let attributes_to_highlight = if attributes_to_highlight == "*" {
|
||||
schema.get_displayed_name()
|
||||
schema
|
||||
.displayed_name()
|
||||
.iter()
|
||||
.map(|s| s.to_string())
|
||||
.collect()
|
||||
} else {
|
||||
attributes_to_highlight
|
||||
.split(',')
|
||||
.map(ToString::to_string)
|
||||
.map(|s| s.to_string())
|
||||
.collect()
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user