boolean unique = false;
if (property.endsWith("," + PropertyIndexConstants.UNIQUE)) {
unique = true;
property = property.substring(0, property.length() - PropertyIndexConstants.UNIQUE.length() - 1);
}
PropertyIndex propertyIndex = indexer.getPropertyIndex(property);
if (propertyIndex == null) {
throw ExceptionFactory.get("Unknown index: " + index);
}
if (unique) {
String value = propertyIndex.getPath(data, revisionId);
if (value != null) {
s.value(value);
}
} else {
Iterator<String> it = propertyIndex.getPaths(data, revisionId);
while (it.hasNext()) {
s.value(it.next());
}
}
}