@@ -1082,6 +1082,7 @@ public void testPartialIndexAndFullIndex() throws Exception {
1082
1082
@ Test
1083
1083
public void testIndexTypeForOrQueries () throws Exception {
1084
1084
indexManager .addFieldIndex (fieldIndex ("coll" , "a" , Kind .ASCENDING ));
1085
+ indexManager .addFieldIndex (fieldIndex ("coll" , "a" , Kind .DESCENDING ));
1085
1086
indexManager .addFieldIndex (fieldIndex ("coll" , "b" , Kind .ASCENDING ));
1086
1087
indexManager .addFieldIndex (fieldIndex ("coll" , "b" , Kind .ASCENDING , "a" , Kind .ASCENDING ));
1087
1088
@@ -1110,7 +1111,7 @@ public void testIndexTypeForOrQueries() throws Exception {
1110
1111
1111
1112
// OR query with implicit orderBy with limit which has missing sub-target indexes.
1112
1113
Query query5 =
1113
- query ("coll" ).filter (orFilters (filter ("a" , "==" , 1 ), filter ("c" , ">" , 1 ))).limitToFirst (2 );
1114
+ query ("coll" ).filter (orFilters (filter ("a" , "==" , 1 ), filter ("c" , ">" , 1 ))).limitToLast (2 );
1114
1115
validateIndexType (query5 , IndexManager .IndexType .NONE );
1115
1116
1116
1117
// OR query without orderBy without limit which has all sub-target indexes.
@@ -1143,7 +1144,7 @@ public void testIndexTypeForOrQueries() throws Exception {
1143
1144
1144
1145
// OR query with implicit orderBy with limit which has all sub-target indexes.
1145
1146
Query query11 =
1146
- query ("coll" ).filter (orFilters (filter ("a" , ">" , 1 ), filter ("b" , "==" , 1 ))).limitToFirst (2 );
1147
+ query ("coll" ).filter (orFilters (filter ("a" , ">" , 1 ), filter ("b" , "==" , 1 ))).limitToLast (2 );
1147
1148
validateIndexType (query11 , IndexManager .IndexType .PARTIAL );
1148
1149
}
1149
1150
0 commit comments