java.lang.Object
dev.nicklasw.query.builder.Node
dev.nicklasw.query.builder.Criteria
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates newPredicate
forRANGE [lowerBound TO upperBound]
.Crates newPredicate
forRANGE [lowerBound TO upperBound]
.boost
(float boost) BoostCriteria
with given factor.protected <T extends Node>
Tcreate()
expression
(@NonNull String s) Creates newPredicate
allowing native solr expressions.Creates newPredicate
with trailing~
followed by levensteinDistance.Creates newPredicate
with trailing~
.float
getBoost()
Boost factor value.getField()
Creates newPredicate
without any wildcards.isNull()
Creates newPredicate
fornull
values.must()
Set theCriteria
as required.mustNot()
Set theCriteria
as negating.Creates newPredicate
allowing regular expression.static Criteria
Static factory method to create a newCriteria
for provided field.static Criteria
Static factory method to create a newCriteria
for field with given name.Methods inherited from class dev.nicklasw.query.builder.Node
add, add, and, connect, getOccur, getOperator, getSiblings, hasOccurEqualTo, hasOccurNotEqualTo, hasParent, hasSiblings, or, setParent
-
Field Details
-
WILDCARD
- See Also:
-
-
Constructor Details
-
Criteria
-
-
Method Details
-
where
Static factory method to create a newCriteria
for field with given name.- Parameters:
fieldName
- must not be null.- Returns:
- the
Criteria
-
where
Static factory method to create a newCriteria
for provided field.- Parameters:
field
- must not be null.- Returns:
- the
Criteria
-
expression
Creates newPredicate
allowing native solr expressions.- Parameters:
s
- must not be null.- Returns:
- the
Criteria
-
is
Creates newPredicate
without any wildcards. Strings with blanks will be escaped"string\ with\ blank"
- Parameters:
o
- must not be null- Returns:
- the
Criteria
-
between
Creates newPredicate
forRANGE [lowerBound TO upperBound]
.- Parameters:
lowerBound
- can be null. A null value will be handled as a wildcard.upperBound
- can be null. A null value will be handled as a wildcard.- Returns:
- the
Criteria
-
between
public Criteria between(@Nullable Object lowerBound, @Nullable Object upperBound, boolean includeLowerBound, boolean includeUpperBound) Crates newPredicate
forRANGE [lowerBound TO upperBound]
.- Parameters:
lowerBound
- can be null. A null value will be handled as a wildcard.upperBound
- can be null. A null value will be handled as a wildcard.includeLowerBound
- to include the lower boundincludeUpperBound
- to include the upper bound- Returns:
- the
Criteria
-
fuzzy
Creates newPredicate
with trailing~
.- Parameters:
s
- must not be null.- Returns:
- the
Criteria
-
fuzzy
Creates newPredicate
with trailing~
followed by levensteinDistance.- Parameters:
s
- must not be null.levenshteinDistance
- must not be null.- Returns:
- the
Criteria
-
regexp
Creates newPredicate
allowing regular expression.- Parameters:
s
- must not be null.- Returns:
- the
Criteria
-
boost
BoostCriteria
with given factor.- Parameters:
boost
- the boost factor- Returns:
- the
Criteria
-
isNull
Creates newPredicate
fornull
values.- Returns:
- the
Criteria
-
must
Set theCriteria
as required.- Returns:
- the
Criteria
-
mustNot
Set theCriteria
as negating.- Returns:
- the
Criteria
-
getPredicates
-
getField
-
getBoost
public float getBoost()Boost factor value.- Returns:
Float.NaN
if not set
-
create
-