Skip to content

Commit 2c540a1

Browse files
committed
Format
1 parent a5f8e45 commit 2c540a1

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

src/search.rs

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
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,
37
};
48
use either::Either;
59
use serde::{de::DeserializeOwned, Deserialize, Serialize, Serializer};
@@ -69,7 +73,10 @@ pub struct SearchResult<T> {
6973
pub ranking_score: Option<f64>,
7074

7175
/// 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+
)]
7380
pub ranking_score_details: Option<Map<String, Value>>,
7481

7582
/// Only returned for federated multi search.
@@ -382,7 +389,7 @@ pub struct SearchQuery<'a, Http: HttpClient> {
382389

383390
#[serde(skip_serializing_if = "Option::is_none")]
384391
pub(crate) index_uid: Option<&'a str>,
385-
392+
386393
/// Configures Meilisearch to return search results based on a query’s meaning and context.
387394
#[serde(skip_serializing_if = "Option::is_none")]
388395
pub hybrid: Option<HybridSearch<'a>>,
@@ -744,7 +751,7 @@ impl<'a, 'b, Http: HttpClient> MultiSearchQuery<'a, 'b, Http> {
744751
self
745752
}
746753

747-
pub fn with_search_query_and_options(
754+
pub fn with_search_query_and_options(
748755
&mut self,
749756
mut search_query: SearchQuery<'b, Http>,
750757
options: QueryFederationOptions,
@@ -807,7 +814,7 @@ pub struct FederationOptions {
807814
/// Display facet information for the specified indexes
808815
#[serde(skip_serializing_if = "Option::is_none")]
809816
pub facets_by_index: Option<HashMap<String, Vec<String>>>,
810-
817+
811818
/// Display facet information for the specified indexes
812819
#[serde(skip_serializing_if = "Option::is_none")]
813820
pub merge_facets: Option<bool>,
@@ -878,7 +885,7 @@ pub struct FederationHitInfo {
878885
/// The product of the _rankingScore of the hit and the weight of the query of origin.
879886
pub weighted_ranking_score: f32,
880887
}
881-
888+
882889
/// A struct representing a facet-search query.
883890
///
884891
/// You can add search parameters using the builder syntax.

0 commit comments

Comments
 (0)