@@ -103,14 +103,9 @@ tests:
103103 query : " science"
104104 sort :
105105 Ordering :
106- - Field : rating
106+ - Score : []
107107 - DESCENDING
108108 add_fields :
109- - AliasedExpression :
110- - FunctionExpression.string_concat :
111- - Field : title
112- - Constant : " - Selected"
113- - " title_selected"
114109 - AliasedExpression :
115110 - Score : []
116111 - " search_score"
@@ -164,16 +159,11 @@ tests:
164159 direction :
165160 stringValue : descending
166161 expression :
167- fieldReferenceValue : rating
162+ functionValue :
163+ name : score
168164 add_fields :
169165 mapValue :
170166 fields :
171- title_selected :
172- functionValue :
173- args :
174- - fieldReferenceValue : title
175- - stringValue : " - Selected"
176- name : string_concat
177167 search_score :
178168 functionValue :
179169 name : score
@@ -237,7 +227,7 @@ tests:
237227 - Search :
238228 - SearchOptions :
239229 query :
240- FunctionExpression.less_than :
230+ FunctionExpression.less_than_or_equal :
241231 - FunctionExpression.geo_distance :
242232 - Field : location
243233 - GeoPoint : [37.0, -122.0]
@@ -269,7 +259,7 @@ tests:
269259 longitude : -122.0
270260 name : geo_distance
271261 - doubleValue : 150000.0
272- name : less_than
262+ name : less_than_or_equal
273263 - args :
274264 - mapValue :
275265 fields :
@@ -284,56 +274,19 @@ tests:
284274 expression :
285275 fieldReferenceValue : name
286276 name : sort
287- - description : search_stage_with_select
288- pipeline :
289- - Collection : books
290- - Search :
291- - SearchOptions :
292- query : " science"
293- select :
294- - title
295- - author
296- assert_results :
297- - title : " Dune"
298- author : " Frank Herbert"
299- - title : " The Hitchhiker's Guide to the Galaxy"
300- author : " Douglas Adams"
301- assert_proto :
302- pipeline :
303- stages :
304- - args :
305- - referenceValue : /books
306- name : collection
307- - name : search
308- options :
309- query :
310- functionValue :
311- args :
312- - stringValue : " science"
313- name : document_matches
314- select :
315- mapValue :
316- fields :
317- author :
318- fieldReferenceValue : author
319- title :
320- fieldReferenceValue : title
321- - description : search_stage_with_select_and_alias
277+ - description : search_stage_with_select_score
322278 pipeline :
323279 - Collection : books
324280 - Search :
325281 - SearchOptions :
326282 query : " science"
327283 select :
328284 - AliasedExpression :
329- - Field : title
330- - " book_title"
331- - author
285+ - Score : []
286+ - " search_score"
332287 assert_results :
333- - book_title : " Dune"
334- author : " Frank Herbert"
335- - book_title : " The Hitchhiker's Guide to the Galaxy"
336- author : " Douglas Adams"
288+ - search_score : 1.0
289+ - search_score : 0.5
337290 assert_proto :
338291 pipeline :
339292 stages :
@@ -350,73 +303,6 @@ tests:
350303 select :
351304 mapValue :
352305 fields :
353- author :
354- fieldReferenceValue : author
355- book_title :
356- fieldReferenceValue : title
357- - description : search_stage_with_multiple_sorts
358- pipeline :
359- - Collection : books
360- - Search :
361- - SearchOptions :
362- query : " science"
363- sort :
364- - Ordering :
365- - Field : rating
366- - DESCENDING
367- - Ordering :
368- - Field : published
369- - ASCENDING
370- assert_results :
371- - title : " Dune"
372- author : " Frank Herbert"
373- genre : " Science Fiction"
374- published : 1965
375- rating : 4.6
376- tags :
377- - politics
378- - desert
379- - adventure
380- awards :
381- hugo : true
382- nebula : true
383- - title : " The Hitchhiker's Guide to the Galaxy"
384- author : " Douglas Adams"
385- genre : " Science Fiction"
386- published : 1979
387- rating : 4.2
388- tags :
389- - comedy
390- - space
391- - adventure
392- awards :
393- hugo : true
394- nebula : false
395- assert_proto :
396- pipeline :
397- stages :
398- - args :
399- - referenceValue : /books
400- name : collection
401- - name : search
402- options :
403- query :
404- functionValue :
405- args :
406- - stringValue : " science"
407- name : document_matches
408- sort :
409- arrayValue :
410- values :
411- - mapValue :
412- fields :
413- direction :
414- stringValue : descending
415- expression :
416- fieldReferenceValue : rating
417- - mapValue :
418- fields :
419- direction :
420- stringValue : ascending
421- expression :
422- fieldReferenceValue : published
306+ search_score :
307+ functionValue :
308+ name : score
0 commit comments