File tree Expand file tree Collapse file tree 1 file changed +20
-26
lines changed Expand file tree Collapse file tree 1 file changed +20
-26
lines changed Original file line number Diff line number Diff line change @@ -138,22 +138,18 @@ println!("{:?}", client.index("movies_2").search().with_query("caorl").execute::
138
138
```
139
139
140
140
Output:
141
-
142
141
```
143
142
[Movie { id: 1, title: String::from("Carol"), genres: vec!["Romance", "Drama"] }]
144
143
```
145
144
146
145
Json output:
147
-
148
146
``` json
149
147
{
150
- "hits" : [
151
- {
152
- "id" : 1 ,
153
- "title" : " Carol" ,
154
- "genres" : [" Romance" , " Drama" ]
155
- }
156
- ],
148
+ "hits" : [{
149
+ "id" : 1 ,
150
+ "title" : " Carol" ,
151
+ "genres" : [" Romance" , " Drama" ]
152
+ }],
157
153
"offset" : 0 ,
158
154
"limit" : 10 ,
159
155
"processingTimeMs" : 1 ,
@@ -175,24 +171,23 @@ println!("{:?}", search_result.hits);
175
171
```
176
172
177
173
Json output:
178
-
179
174
``` json
180
175
{
181
- "hits" : [
182
- {
183
- "id" : 6 ,
184
- "title" : " Philadelphia" ,
185
- "_formatted" : {
186
- "id" : 6 ,
187
- "title" : " <em>Phil</em>adelphia" ,
188
- "genre" : [" Drama" ]
189
- }
190
- }
191
- ],
192
- "offset" : 0 ,
193
- "limit" : 20 ,
194
- "processingTimeMs" : 0 ,
195
- "query" : " phil"
176
+ "hits" : [
177
+ {
178
+ "id" : 6 ,
179
+ "title" : " Philadelphia" ,
180
+ "_formatted" : {
181
+ "id" : 6 ,
182
+ "title" : " <em>Phil</em>adelphia" ,
183
+ "genre" : [" Drama" ]
184
+ }
185
+ }
186
+ ],
187
+ "offset" : 0 ,
188
+ "limit" : 20 ,
189
+ "processingTimeMs" : 0 ,
190
+ "query" : " phil"
196
191
}
197
192
```
198
193
@@ -227,7 +222,6 @@ println!("{:?}", search_result.hits);
227
222
```
228
223
229
224
Json output:
230
-
231
225
``` json
232
226
{
233
227
"hits" : [
You can’t perform that action at this time.
0 commit comments