use of org.apache.jackrabbit.oak.plugins.index.lucene.property.HybridPropertyIndexUtil.PROPERTY_INDEX in project jackrabbit-oak by apache.
the class HybridPropertyIndexLookup method query.
private Iterable<String> query(Filter filter, String propertyName, Set<String> encodedValues) {
String propIdxNodeName = HybridPropertyIndexUtil.getNodeName(propertyName);
NodeState propIndexRootNode = indexState.getChildNode(PROPERTY_INDEX);
NodeState propIndexNode = propIndexRootNode.getChildNode(propIdxNodeName);
if (!propIndexNode.exists()) {
return Collections.emptyList();
}
String indexName = indexPath + "(" + propertyName + ")";
Iterable<String> result;
if (uniquePropertyIndex(propIndexNode)) {
result = queryUnique(filter, indexName, propIndexRootNode, propIdxNodeName, encodedValues);
} else {
result = querySimple(filter, indexName, propIndexNode, encodedValues);
}
Iterable<String> paths = transform(result, path -> isAbsolute(path) ? path : "/" + path);
if (log.isTraceEnabled()) {
paths = transform(paths, path -> {
log.trace("[{}] {} = {} -> {}", indexPath, propertyName, encodedValues, path);
return path;
});
}
return paths;
}
Aggregations