Julian Reschke created JCR-3611:
-----------------------------------
Summary: Extend index configuration to support pluggable
aggregation filters
Key: JCR-3611
URL: https://issues.apache.org/jira/browse/JCR-3611
Project: Jackrabbit Content Repository
Issue Type: Improvement
Components: query
Reporter: Julian Reschke
Priority: Minor
It can be useful to restrict the set of nodes to be aggregated in the search
index based on their current state.
It's currently possible to achieve this by wrapping Jackrabbit's
IndexingConfigurationImpl and AggregateRuleImpl, essentially
post-processing/filtering the node states that the base classes collect.
This works fine for now, but requires quite some glue code; we may want to make
that simpler.
Thus, I'd like to extend the index aggregate configuration (see
<http://wiki.apache.org/jackrabbit/IndexingConfiguration>) so that one (or
more) filter classes can be specified for each aggregate rule. Those filters
would implement a simple API:
public interface AggregationFilter {
void init(QueryHandlerContext context, NamespaceMappings
namespaceMappings);
/**
* Check whether the given node should be aggregated under the
container node
* @param ns node to be checked
* @param container container node
* @return whether to aggregate it
*/
boolean canIncludeInResult(NodeState ns, NodeState container);
}
Jackrabbit's AggregateRuleImpl could then instantiate these filters and
apply them, and thus no additional glue code would be needed.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira