mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
Add API search setting
This commit is contained in:
parent
a3716c5678
commit
461b5118bd
7 changed files with 22 additions and 2 deletions
|
@ -70,6 +70,8 @@ pub struct SearchQueryGet {
|
|||
crop_marker: String,
|
||||
#[deserr(default, error = DeserrQueryParamError<InvalidSearchMatchingStrategy>)]
|
||||
matching_strategy: MatchingStrategy,
|
||||
#[deserr(default, error = DeserrQueryParamError<InvalidRestrictSearchableAttributes>)]
|
||||
pub restrict_searchable_attributes: Option<CS<String>>,
|
||||
}
|
||||
|
||||
impl From<SearchQueryGet> for SearchQuery {
|
||||
|
@ -102,6 +104,9 @@ impl From<SearchQueryGet> for SearchQuery {
|
|||
highlight_post_tag: other.highlight_post_tag,
|
||||
crop_marker: other.crop_marker,
|
||||
matching_strategy: other.matching_strategy,
|
||||
restrict_searchable_attributes: other
|
||||
.restrict_searchable_attributes
|
||||
.map(|o| o.into_iter().collect()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue