@Override
    ObjectNode toJson(ObjectMapper mapper)  {
      ObjectNode result = mapper.createObjectNode();
      final ArrayNode terms = result.with("terms").withArray(fieldName);
      for (Object value: values) {
        terms.add(toJsonValue(value, mapper));
      }
      return result;
    }
A filter for a field based on several terms matching on any of them.
criteria/elasticsearch/src/org/immutables/criteria/elasticsearch/QueryBuilders.java