Thank you very much for your answer. Unfortunaly, in my case, i just wonder how to replace the field method ? What becomes fieldName ? (my problem is that .field(fieldName) doesn't exist anymore)
private Query.Builder resolveFilterSimple(CriteriaFilter criterion) {
String fieldName = null;
if (criterion.getCriteriaSimple().getField() != null) {
fieldName = criterion.getCriteriaSimple().getField();
}
StringBuilder query;
//Echappe TOUS les caratères spéciaux
final String totallyEscapedCriterion = escapeReserved(criterion.getCriteriaSimple().getValue().toString());
//Echappe seulement les \
final String criterionWithEscapedSlashes = onlyEscapeSlash(criterion.getCriteriaSimple().getValue().toString());
RangeQuery.Builder rangeQueryBuilder;
switch (criterion.getCriteriaSimple().getOperator()) {
case BETWEEN:
rangeQueryBuilder = new RangeQuery.Builder()
.field(fieldName)
.gte(JsonData.of(criterion.getCriteriaSimple().getMinValue()))
.lte(JsonData.of(criterion.getCriteriaSimple().getMaxValue()));
return (Query.Builder) new Query.Builder().range(rangeQueryBuilder.build());
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.