@@ -283,4 +283,140 @@ tests:
283283 stringValue : ascending
284284 expression :
285285 fieldReferenceValue : name
286- name : sort
286+ 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
322+ pipeline :
323+ - Collection : books
324+ - Search :
325+ - SearchOptions :
326+ query : " science"
327+ select :
328+ - AliasedExpression :
329+ - Field : title
330+ - " book_title"
331+ - author
332+ assert_results :
333+ - book_title : " Dune"
334+ author : " Frank Herbert"
335+ - book_title : " The Hitchhiker's Guide to the Galaxy"
336+ author : " Douglas Adams"
337+ assert_proto :
338+ pipeline :
339+ stages :
340+ - args :
341+ - referenceValue : /books
342+ name : collection
343+ - name : search
344+ options :
345+ query :
346+ functionValue :
347+ args :
348+ - stringValue : " science"
349+ name : document_matches
350+ select :
351+ mapValue :
352+ 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
0 commit comments