@@ -27,13 +27,13 @@ import static com.mongodb.client.model.Sorts.orderBy
27
27
28
28
class SortsFunctionalSpecification extends OperationFunctionalSpecification {
29
29
def a = new Document (' _id' , 1 ). append(' x' , 1 )
30
- .append(' y' , ' b ' )
30
+ .append(' y' , ' bear ' )
31
31
32
32
def b = new Document (' _id' , 2 ). append(' x' , 1 )
33
- .append(' y' , ' a ' )
33
+ .append(' y' , ' albatross ' )
34
34
35
35
def c = new Document (' _id' , 3 ). append(' x' , 2 )
36
- .append(' y' , ' c ' )
36
+ .append(' y' , ' cat ' )
37
37
38
38
def setup () {
39
39
getCollectionHelper(). insertDocuments(a, b, c)
@@ -44,7 +44,11 @@ class SortsFunctionalSpecification extends OperationFunctionalSpecification {
44
44
}
45
45
46
46
def ' find' (Bson sort, Bson projection) {
47
- getCollectionHelper(). find(new Document (), sort, projection)
47
+ find(new Document (), sort, projection)
48
+ }
49
+
50
+ def ' find' (Bson filter, Bson sort, Bson projection) {
51
+ getCollectionHelper(). find(filter, sort, projection)
48
52
}
49
53
50
54
def ' ascending' () {
@@ -66,7 +70,8 @@ class SortsFunctionalSpecification extends OperationFunctionalSpecification {
66
70
getCollectionHelper(). createIndex(new Document (' y' , ' text' ))
67
71
68
72
expect :
69
- find(metaTextScore(' score' ), new Document (' score' , new Document (' $meta' , ' textScore' )))* . containsKey(' score' )
73
+ find(new Document (' $text' , new Document (' $search' , ' bear' )), metaTextScore(' score' ),
74
+ new Document (' score' , new Document (' $meta' , ' textScore' )))* . containsKey(' score' )
70
75
}
71
76
72
77
def ' orderBy' () {
0 commit comments