Interface IndexStoreStrategy
- All Known Implementing Classes:
ContentMirrorStoreStrategy,FilteringIndexStoreStrategy,UniqueEntryStoreStrategy
public interface IndexStoreStrategy
Strategy that defines how the index content will be actually stored under the
index node
-
Method Summary
Modifier and TypeMethodDescriptionlongCount the occurrence of a given set of values.longCount the occurrence of a given set of values.booleanexists(org.apache.jackrabbit.guava.common.base.Supplier<NodeBuilder> index, String key) Check whether an entry for the given key exists.Search for a given set of values.voidupdate(org.apache.jackrabbit.guava.common.base.Supplier<NodeBuilder> index, String path, String indexName, NodeBuilder indexMeta, Set<String> beforeKeys, Set<String> afterKeys) Updates the index for the given path.
-
Method Details
-
update
void update(org.apache.jackrabbit.guava.common.base.Supplier<NodeBuilder> index, String path, String indexName, NodeBuilder indexMeta, Set<String> beforeKeys, Set<String> afterKeys) throws CommitFailedException Updates the index for the given path.- Parameters:
index- the index node supplierpath- path stored in the indexindexName- the name of the index. May be null.indexMeta- the definition of the index. May be null.beforeKeys- keys that no longer apply to the pathafterKeys- keys that now do apply to the path- Throws:
CommitFailedException
-
exists
Check whether an entry for the given key exists.- Parameters:
index- the index node supplierkey- the key- Returns:
- true if at least one entry exists
-
query
Iterable<String> query(Filter filter, String indexName, NodeState indexMeta, Iterable<String> values) Search for a given set of values.- Parameters:
filter- the filter (can optionally be used for optimized query execution)indexName- the name of the index (for logging)indexMeta- the index metadata node (may not be null)values- values to look for (null to check for property existence)- Returns:
- an iterator of paths
-
count
Count the occurrence of a given set of values. Used in calculating the cost of an index.- Parameters:
root- the root node (may not be null)indexMeta- the index metadata node (may not be null)values- values to look for (null to check for property existence)max- the maximum value to return- Returns:
- the aggregated count of occurrences for each provided value
-
count
Count the occurrence of a given set of values. Used in calculating the cost of an index.- Parameters:
filter- the filter which can be used to estimate better costroot- the root node (may not be null)indexMeta- the index metadata node (may not be null)values- values to look for (null to check for property existence)max- the maximum value to return- Returns:
- the aggregated count of occurrences for each provided value
-
getIndexNodeName
String getIndexNodeName()
-