public class PredicateGroupEvaluator extends AbstractPredicateEvaluator
p.or and p.not as well.
Example for matching either one of two properties against a value:
group.p.or=true
group.1_property=jcr:title
group.1_property.value=My Page
group.2_property=navTitle
group.2_property.value=My Page
This is conceptually (1_property OR 2_property).
Example for nested groups:
fulltext=Management
group.p.or=true
group.1_group.path=/content/geometrixx/en
group.1_group.type=cq:Page
group.2_group.path=/content/dam/geometrixx
group.2_group.type=dam:Asset
This searches for the term "Management" within pages in /content/geometrixx/en
or in assets in /content/dam/geometrixx. This is conceptually
fulltext AND ( (path AND type) OR (path AND type) ).
Be aware that such OR joins need good indexes for performance.
| Constructor and Description |
|---|
PredicateGroupEvaluator() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canFilter(Predicate predicate,
EvaluationContext context)
Returns the same as the deprecated
AbstractPredicateEvaluator.isFiltering(Predicate, EvaluationContext) method (ie. |
boolean |
canXpath(Predicate predicate,
EvaluationContext context)
Returns the inverted boolean value of the deprecated
AbstractPredicateEvaluator.isFiltering(Predicate, EvaluationContext) method (ie. |
FacetExtractor |
getFacetExtractor(Predicate predicate,
EvaluationContext context)
Default implementation that always returns
null, ie. |
java.lang.String |
getXPathExpression(Predicate p,
EvaluationContext context)
Default implementation that always returns
null, ie. |
boolean |
includes(Predicate p,
Row row,
EvaluationContext context)
Default implementation that always returns
true, ie. |
java.lang.String |
listFilteringPredicates(PredicateGroup group,
EvaluationContext context) |
getOrderByComparator, getOrderByProperties, isFilteringpublic java.lang.String getXPathExpression(Predicate p, EvaluationContext context)
AbstractPredicateEvaluatornull, ie. adds
nothing to the XPath query. Subclasses can choose whether they want to
implement this method or use the
AbstractPredicateEvaluator.includes(Predicate, Row, EvaluationContext) method for advanced
filtering (or both).getXPathExpression in interface PredicateEvaluatorgetXPathExpression in class AbstractPredicateEvaluatorp - predicate (for this evaluator type) which is evaluatedcontext - helper class which provides access to various elements of the
query evaluationpublic boolean includes(Predicate p, Row row, EvaluationContext context)
AbstractPredicateEvaluatortrue, ie. it does
not "touch" the result set at all.includes in interface PredicateEvaluatorincludes in class AbstractPredicateEvaluatorp - predicate (for this evaluator type) which is evaluatedrow - current row of the result set returned through the xpath querycontext - helper class which provides access to various elements of the
query evaluationtrue if this row should be part of the final result
set, false if it should be droppedpublic boolean canXpath(Predicate predicate, EvaluationContext context)
AbstractPredicateEvaluatorAbstractPredicateEvaluator.isFiltering(Predicate, EvaluationContext) method (ie. if not
overridden, true).canXpath in interface PredicateEvaluatorcanXpath in class AbstractPredicateEvaluatorpredicate - predicate (for this evaluator type) which is evaluatedcontext - helper class which provides access to various elements of the
query evaluationtrue if this evaluator can express itself via xpath,
ie. PredicateEvaluator.getXPathExpression(Predicate, EvaluationContext)public boolean canFilter(Predicate predicate, EvaluationContext context)
AbstractPredicateEvaluatorAbstractPredicateEvaluator.isFiltering(Predicate, EvaluationContext) method (ie. if not
overridden, false).canFilter in interface PredicateEvaluatorcanFilter in class AbstractPredicateEvaluatorpredicate - predicate (for this evaluator type) which is evaluatedcontext - helper class which provides access to various elements of the
query evaluationtrue if this evaluator can be express itself via
filtering, ie.
PredicateEvaluator.includes(Predicate, Row, EvaluationContext)public java.lang.String listFilteringPredicates(PredicateGroup group, EvaluationContext context)
public FacetExtractor getFacetExtractor(Predicate predicate, EvaluationContext context)
AbstractPredicateEvaluatornull, ie. no
facets will be extracted for the predicate.getFacetExtractor in interface PredicateEvaluatorgetFacetExtractor in class AbstractPredicateEvaluatorpredicate - predicate (for this evaluator type) which is evaluatedcontext - helper class which provides access to various elements of the
query evaluationFacetExtractor that is used to create a Facet
or null if no extractor shall be providedCopyright © 2010 - 2023 Adobe. All Rights Reserved