use of org.apache.geode.redis.internal.executor.SortedSetQuery in project geode by apache.
the class RegionProvider method doInitializeSortedSet.
private void doInitializeSortedSet(ByteArrayWrapper key, Region<?, ?> r) throws RegionNotFoundException, IndexInvalidException {
String fullpath = r.getFullPath();
try {
queryService.createIndex("scoreIndex", "entry.value.score", r.getFullPath() + ".entrySet entry");
queryService.createIndex("scoreIndex2", "value.score", r.getFullPath() + ".values value");
} catch (IndexNameConflictException | IndexExistsException | UnsupportedOperationException e) {
// ignore, these indexes already exist or unsupported but make sure prepared queries are made
}
HashMap<Enum<?>, Query> queryList = new HashMap<Enum<?>, Query>();
for (SortedSetQuery lq : SortedSetQuery.values()) {
String queryString = lq.getQueryString(fullpath);
Query query = this.queryService.newQuery(queryString);
queryList.put(lq, query);
}
this.preparedQueries.put(key, queryList);
}
Aggregations