private Map<Object, Long> queryGraphQueryWithHistogramAggregation( String propertyName, String interval, Long minDocCount, HistogramAggregation.ExtendedBounds extendedBounds, Authorizations authorizations ) { Query q = graph.query(authorizations).limit(0); HistogramAggregation agg = new HistogramAggregation("hist-count", propertyName, interval, minDocCount); agg.setExtendedBounds(extendedBounds); if (!q.isAggregationSupported(agg)) { LOGGER.warn("%s unsupported", HistogramAggregation.class.getName()); return null; } q.addAggregation(agg); return histogramBucketToMap(q.vertices().getAggregationResult("hist-count", HistogramResult.class).getBuckets()); }
private Map<Object, Long> queryGraphQueryWithHistogramAggregation( String propertyName, String interval, Long minDocCount, HistogramAggregation.ExtendedBounds extendedBounds, Authorizations authorizations ) { Query q = graph.query(authorizations).limit(0); HistogramAggregation agg = new HistogramAggregation("hist-count", propertyName, interval, minDocCount); agg.setExtendedBounds(extendedBounds); if (!q.isAggregationSupported(agg)) { LOGGER.warn("%s unsupported", HistogramAggregation.class.getName()); return null; } q.addAggregation(agg); return histogramBucketToMap(q.vertices().getAggregationResult("hist-count", HistogramResult.class).getBuckets()); }