Add attributes_to_search_on

This commit is contained in:
Louis Dureuil 2023-06-28 15:16:04 +02:00 committed by Clément Renault
parent 362e9ff845
commit 82e1f59f1e
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4

View File

@ -38,6 +38,8 @@ pub struct FacetSearchQuery {
pub filter: Option<Value>, pub filter: Option<Value>,
#[deserr(default, error = DeserrJsonError<InvalidSearchMatchingStrategy>, default)] #[deserr(default, error = DeserrJsonError<InvalidSearchMatchingStrategy>, default)]
pub matching_strategy: MatchingStrategy, pub matching_strategy: MatchingStrategy,
#[deserr(default, error = DeserrJsonError<InvalidAttributesToSearchOn>, default)]
pub attributes_to_search_on: Option<Vec<String>>,
} }
pub async fn search( pub async fn search(
@ -90,6 +92,7 @@ impl From<FacetSearchQuery> for SearchQuery {
vector, vector,
filter, filter,
matching_strategy, matching_strategy,
attributes_to_search_on,
} = value; } = value;
SearchQuery { SearchQuery {
@ -113,6 +116,7 @@ impl From<FacetSearchQuery> for SearchQuery {
crop_marker: DEFAULT_CROP_MARKER(), crop_marker: DEFAULT_CROP_MARKER(),
matching_strategy, matching_strategy,
vector, vector,
attributes_to_search_on,
} }
} }
} }