/** * Target the given field in the range predicate. * <p> * Multiple fields may be targeted by the same predicate: * the predicate will match if <em>any</em> targeted field matches. * <p> * When targeting multiple fields, those fields must have compatible types. * See <a href="SearchPredicateFactoryContext.html#commonconcepts-parametertype">there</a> for more information. * * @param absoluteFieldPath The absolute path (from the document root) of the targeted field. * @return A {@link RangePredicateFieldSetContext} allowing to define field-specific settings * (such as the {@link RangePredicateFieldSetContext#boostedTo(float) boost}), * or simply to continue the definition of the range predicate * ({@link RangePredicateFieldSetContext#from(Object) bounds}, ...). */ default RangePredicateFieldSetContext onField(String absoluteFieldPath) { return onFields( absoluteFieldPath ); }
/** * Target the given field in the range predicate. * <p> * Multiple fields may be targeted by the same predicate: * the predicate will match if <em>any</em> targeted field matches. * <p> * When targeting multiple fields, those fields must have compatible types. * See <a href="SearchPredicateFactoryContext.html#commonconcepts-parametertype">there</a> for more information. * * @param absoluteFieldPath The absolute path (from the document root) of the targeted field. * @return A {@link RangePredicateFieldSetContext} allowing to define field-specific settings * (such as the {@link RangePredicateFieldSetContext#boostedTo(float) boost}), * or simply to continue the definition of the range predicate * ({@link RangePredicateFieldSetContext#from(Object) bounds}, ...). */ default RangePredicateFieldSetContext onField(String absoluteFieldPath) { return onFields( absoluteFieldPath ); }
() -> searchTarget.predicate().range().onFields( indexMapping.string1Field.relativeFieldName, "unknown_field" )
.predicate( f -> f.range().onFields( indexMapping.string1Field.relativeFieldName, indexMapping.string2Field.relativeFieldName ) .below( indexMapping.string1Field.document1Value.indexedValue ) .toPredicate() .predicate( f -> f.range().onFields( indexMapping.string1Field.relativeFieldName, indexMapping.string2Field.relativeFieldName ) .above( indexMapping.string2Field.document3Value.indexedValue ) .toPredicate()