@@ -6,7 +6,7 @@ use serde::{de::DeserializeOwned, ser::SerializeStruct, Deserialize, Serialize,
6
6
use serde_json:: { Map , Value } ;
7
7
use std:: collections:: HashMap ;
8
8
9
- #[ derive( Deserialize , Debug , Eq , PartialEq , Clone ) ]
9
+ #[ derive( Serialize , Deserialize , Debug , Eq , PartialEq , Clone ) ]
10
10
pub struct MatchRange {
11
11
pub start : usize ,
12
12
pub length : usize ,
@@ -50,7 +50,7 @@ pub enum MatchingStrategies {
50
50
/// A single result.
51
51
///
52
52
/// Contains the complete object, optionally the formatted object, and optionally an object that contains information about the matches.
53
- #[ derive( Deserialize , Debug , Clone ) ]
53
+ #[ derive( Serialize , Deserialize , Debug , Clone ) ]
54
54
pub struct SearchResult < T > {
55
55
/// The full result.
56
56
#[ serde( flatten) ]
@@ -68,14 +68,14 @@ pub struct SearchResult<T> {
68
68
pub ranking_score_details : Option < Map < String , Value > > ,
69
69
}
70
70
71
- #[ derive( Deserialize , Debug , Clone ) ]
71
+ #[ derive( Serialize , Deserialize , Debug , Clone ) ]
72
72
#[ serde( rename_all = "camelCase" ) ]
73
73
pub struct FacetStats {
74
74
pub min : f64 ,
75
75
pub max : f64 ,
76
76
}
77
77
78
- #[ derive( Deserialize , Debug , Clone ) ]
78
+ #[ derive( Serialize , Deserialize , Debug , Clone ) ]
79
79
#[ serde( rename_all = "camelCase" ) ]
80
80
/// A struct containing search results and other information about the search.
81
81
pub struct SearchResults < T > {
@@ -657,7 +657,7 @@ impl<'a, 'b, Http: HttpClient> MultiSearchQuery<'a, 'b, Http> {
657
657
self . client . execute_multi_search_query :: < T > ( self ) . await
658
658
}
659
659
}
660
- #[ derive( Debug , Clone , Deserialize ) ]
660
+ #[ derive( Debug , Clone , Deserialize , Serialize ) ]
661
661
pub struct MultiSearchResponse < T > {
662
662
pub results : Vec < SearchResults < T > > ,
663
663
}
0 commit comments