params.put("indexedPropValue",indexedPropValue);
String statement = "MATCH (n:`" + label + "`) " +
"USING INDEX n:`" + label + "`(" + indexedPropName + ") " +
"where n.`" + indexedPropName + "` = {indexedPropValue} " +
"return DISTINCT ID(n)";
Result result = null;
for (int i=0;i<RETRIES;i++) {
try {
sleep(500);
result = queryEngine.query(statement, params);
break;
} catch (InvalidDataAccessResourceUsageException e) {
if (i == RETRIES-1) throw e;
}
}
assertNotNull(result);
Result<Long> results = result.to(Long.class);
return IteratorUtil.asCollection(results.iterator());
}