Skip to content

Commit 6a251d2

Browse files
author
teck
committed
update for new AggregatorResult API
1 parent 2659096 commit 6a251d2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/org/sharrissf/sample/EhcacheSearchPlaying.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public void runTests() throws IOException {
149149
Query averageAgeQuery = cache.createQuery();
150150
averageAgeQuery.includeAggregator(Aggregators.average(age));
151151
System.out.println("Average age: "
152-
+ averageAgeQuery.execute().getAggregatorResults());
152+
+ averageAgeQuery.execute().all().iterator().next().getAggregatorResults());
153153

154154
read();
155155

@@ -160,7 +160,7 @@ public void runTests() throws IOException {
160160
agesBetween.addCriteria(age.between(30, 40));
161161
agesBetween.includeAggregator(Aggregators.average(age));
162162
System.out.println("Average age between 30 and 40: "
163-
+ agesBetween.execute().getAggregatorResults());
163+
+ agesBetween.execute().all().iterator().next().getAggregatorResults());
164164

165165
read();
166166

@@ -170,7 +170,7 @@ public void runTests() throws IOException {
170170
state.eq("NJ"));
171171
newJerseyCountQuery.includeAggregator(Aggregators.count());
172172
System.out.println("Count of people from NJ: "
173-
+ newJerseyCountQuery.execute().getAggregatorResults());
173+
+ newJerseyCountQuery.execute().all().iterator().next().getAggregatorResults());
174174
}
175175

176176
private void loadCache() {

0 commit comments

Comments
 (0)