index = index.substring(0, idx);
JsopStream s = new JsopStream();
s.array();
if (index.startsWith(PropertyIndexConstants.TYPE_PREFIX)) {
String prefix = index.substring(PropertyIndexConstants.TYPE_PREFIX.length());
PrefixIndex prefixIndex = indexer.getPrefixIndex(prefix);
if (prefixIndex == null) {
throw ExceptionFactory.get("Unknown index: " + index);
}
Iterator<String> it = prefixIndex.getPaths(data, revisionId);
while (it.hasNext()) {
s.value(it.next());
}
} else if (index.startsWith(PropertyIndexConstants.TYPE_PROPERTY)) {
String property = index.substring(PropertyIndexConstants.TYPE_PROPERTY.length());