예제 #1
0
 @Override
 protected Query applyArrayReference(
     Reference arrayReference, Literal literal, Context context) throws IOException {
   // 1 < ANY (array_col) --> array_col > 1
   return rangeQuery.toQuery(
       arrayReference,
       ((CollectionType) arrayReference.valueType()).innerType(),
       literal.value());
 }
예제 #2
0
 @Override
 protected Query applyArrayLiteral(Reference reference, Literal arrayLiteral, Context context)
     throws IOException {
   // col < ANY ([1,2,3]) --> or(col<1, col<2, col<3)
   BooleanQuery booleanQuery = new BooleanQuery();
   booleanQuery.setMinimumNumberShouldMatch(1);
   for (Object value : toIterable(arrayLiteral.value())) {
     booleanQuery.add(
         inverseRangeQuery.toQuery(reference, reference.valueType(), value),
         BooleanClause.Occur.SHOULD);
   }
   return booleanQuery;
 }