|
1 | 1 | use crate::{ |
2 | | - client::Client, errors::{Error, MeilisearchError}, indexes::Index, request::HttpClient, DefaultHttpClient, |
| 2 | + client::Client, |
| 3 | + errors::{Error, MeilisearchError}, |
| 4 | + indexes::Index, |
| 5 | + request::HttpClient, |
| 6 | + DefaultHttpClient, |
3 | 7 | }; |
4 | 8 | use either::Either; |
5 | 9 | use serde::{de::DeserializeOwned, Deserialize, Serialize, Serializer}; |
@@ -69,7 +73,10 @@ pub struct SearchResult<T> { |
69 | 73 | pub ranking_score: Option<f64>, |
70 | 74 |
|
71 | 75 | /// A detailed global ranking score field |
72 | | - #[serde(rename = "_rankingScoreDetails", skip_serializing_if = "Option::is_none")] |
| 76 | + #[serde( |
| 77 | + rename = "_rankingScoreDetails", |
| 78 | + skip_serializing_if = "Option::is_none" |
| 79 | + )] |
73 | 80 | pub ranking_score_details: Option<Map<String, Value>>, |
74 | 81 |
|
75 | 82 | /// Only returned for federated multi search. |
@@ -382,7 +389,7 @@ pub struct SearchQuery<'a, Http: HttpClient> { |
382 | 389 |
|
383 | 390 | #[serde(skip_serializing_if = "Option::is_none")] |
384 | 391 | pub(crate) index_uid: Option<&'a str>, |
385 | | - |
| 392 | + |
386 | 393 | /// Configures Meilisearch to return search results based on a query’s meaning and context. |
387 | 394 | #[serde(skip_serializing_if = "Option::is_none")] |
388 | 395 | pub hybrid: Option<HybridSearch<'a>>, |
@@ -744,7 +751,7 @@ impl<'a, 'b, Http: HttpClient> MultiSearchQuery<'a, 'b, Http> { |
744 | 751 | self |
745 | 752 | } |
746 | 753 |
|
747 | | - pub fn with_search_query_and_options( |
| 754 | + pub fn with_search_query_and_options( |
748 | 755 | &mut self, |
749 | 756 | mut search_query: SearchQuery<'b, Http>, |
750 | 757 | options: QueryFederationOptions, |
@@ -807,7 +814,7 @@ pub struct FederationOptions { |
807 | 814 | /// Display facet information for the specified indexes |
808 | 815 | #[serde(skip_serializing_if = "Option::is_none")] |
809 | 816 | pub facets_by_index: Option<HashMap<String, Vec<String>>>, |
810 | | - |
| 817 | + |
811 | 818 | /// Display facet information for the specified indexes |
812 | 819 | #[serde(skip_serializing_if = "Option::is_none")] |
813 | 820 | pub merge_facets: Option<bool>, |
@@ -878,7 +885,7 @@ pub struct FederationHitInfo { |
878 | 885 | /// The product of the _rankingScore of the hit and the weight of the query of origin. |
879 | 886 | pub weighted_ranking_score: f32, |
880 | 887 | } |
881 | | - |
| 888 | + |
882 | 889 | /// A struct representing a facet-search query. |
883 | 890 | /// |
884 | 891 | /// You can add search parameters using the builder syntax. |
|
0 commit comments