@@ -347,7 +347,7 @@ The fields that are targeted by the aggregation function must be declared <<mapp
347
347
348
348
The `sum` aggregation sums up the field values.
349
349
350
- .Sum the prices all of the science fiction books
350
+ .Sum the prices of all science fiction books
351
351
====
352
352
[source, JAVA, indent=0, subs="+callouts"]
353
353
----
@@ -358,9 +358,10 @@ include::{sourcedir}/org/hibernate/search/documentation/search/aggregation/Aggre
358
358
359
359
[NOTE]
360
360
====
361
- You can always use the field type for the expected returned type.
362
- Another option is to set `Double.class` for the expected returned type and you can always do it
363
- even if the field is not double typed.
361
+ You can always use the field type for the expected returned value.
362
+ Alternatively, as aggregations usually involve some mathematical computations,
363
+ it is possible to request a `Double.class` result, which will return the aggregated value
364
+ as the corresponding search backend computed it.
364
365
====
365
366
366
367
=== Min metric aggregation
@@ -391,9 +392,9 @@ include::{sourcedir}/org/hibernate/search/documentation/search/aggregation/Aggre
391
392
392
393
=== Count metric aggregation
393
394
394
- The `count` aggregation counts the field values.
395
+ The `count` aggregation counts the number of documents in which the field is not empty.
395
396
396
- .Count anytime the price field has a value among all the science fiction books
397
+ .Count the number of the science fiction books with prices
397
398
====
398
399
[source, JAVA, indent=0, subs="+callouts"]
399
400
----
@@ -404,7 +405,7 @@ include::{sourcedir}/org/hibernate/search/documentation/search/aggregation/Aggre
404
405
405
406
=== Count distinct metric aggregation
406
407
407
- The `count distinct` aggregation counts the different field values.
408
+ The `count distinct` aggregation counts the number of unique field values.
408
409
409
410
.Count anytime the price field has a different value among all the science fiction books
410
411
====
@@ -417,9 +418,9 @@ include::{sourcedir}/org/hibernate/search/documentation/search/aggregation/Aggre
417
418
418
419
=== Avg metric aggregation
419
420
420
- Applies the SQL `avg` aggregation function on a given numeric or temporal field.
421
+ The `avg` aggregation calculates the average value of a given numeric or temporal field among the selected documents .
421
422
422
- .Compute the average of the prices all of the science fiction books
423
+ .Compute the average price of all science fiction books
423
424
====
424
425
[source, JAVA, indent=0, subs="+callouts"]
425
426
----
0 commit comments