@@ -59,9 +59,9 @@ object ElasticAggregationSpec extends ZIOSpecDefault {
5959 )
6060 },
6161 test(" bucketSort" ) {
62- val aggregationWithFrom = bucketSortAggregation(" aggregation" ).from(5 )
63- val aggregationWithSize = bucketSortAggregation(" aggregation" ).size(5 )
64- val aggregationWithSort = bucketSortAggregation(" aggregation" ).sort(ElasticSort .sortBy(" aggregation2" ))
62+ val aggregationWithFrom = bucketSortAggregation(" aggregation" ).from(5 )
63+ val aggregationWithSize = bucketSortAggregation(" aggregation" ).size(5 )
64+ val aggregationWithSort = bucketSortAggregation(" aggregation" ).sort(ElasticSort .sortBy(" aggregation2" ))
6565 val aggregationWithAllParams =
6666 bucketSortAggregation(" aggregation" ).sort(ElasticSort .sortBy(" aggregation2" )).from(5 ).size(7 )
6767
@@ -128,11 +128,11 @@ object ElasticAggregationSpec extends ZIOSpecDefault {
128128 )
129129 },
130130 test(" extendedStats" ) {
131- val aggregation = extendedStatsAggregation(" aggregation" , " testField" )
132- val aggregationTs = extendedStatsAggregation(" aggregation" , TestSubDocument .intField)
133- val aggregationTsRaw = extendedStatsAggregation(" aggregation" , TestSubDocument .intField.raw)
134- val aggregationWithMissing = extendedStatsAggregation(" aggregation" , TestSubDocument .intField).missing(20.0 )
135- val aggregationWithSigma = extendedStatsAggregation(" aggregation" , TestSubDocument .intField).sigma(3.0 )
131+ val aggregation = extendedStatsAggregation(" aggregation" , " testField" )
132+ val aggregationTs = extendedStatsAggregation(" aggregation" , TestSubDocument .intField)
133+ val aggregationTsRaw = extendedStatsAggregation(" aggregation" , TestSubDocument .intField.raw)
134+ val aggregationWithMissing = extendedStatsAggregation(" aggregation" , TestSubDocument .intField).missing(20.0 )
135+ val aggregationWithSigma = extendedStatsAggregation(" aggregation" , TestSubDocument .intField).sigma(3.0 )
136136 val aggregationWithMissingAndSigma =
137137 extendedStatsAggregation(" aggregation" , TestSubDocument .intField).missing(20.0 ).sigma(3.0 )
138138
@@ -151,8 +151,8 @@ object ElasticAggregationSpec extends ZIOSpecDefault {
151151 )
152152 },
153153 test(" filter" ) {
154- val query = term(TestDocument .stringField, " test" )
155- val aggregation = filterAggregation(" aggregation" , query)
154+ val query = term(TestDocument .stringField, " test" )
155+ val aggregation = filterAggregation(" aggregation" , query)
156156 val aggregationWithSubAggregation =
157157 filterAggregation(" aggregation" , query).withSubAgg(minAggregation(" subAggregation" , TestDocument .intField))
158158 val aggregationWithMultipleSubAggregations = filterAggregation(" aggregation" , query)
@@ -284,9 +284,9 @@ object ElasticAggregationSpec extends ZIOSpecDefault {
284284 )
285285 },
286286 test(" percentileRanks" ) {
287- val aggregation = percentileRanksAggregation(" aggregation" , " testField" , 5 , 6 )
288- val aggregationTs = percentileRanksAggregation(" aggregation" , TestSubDocument .intField, 5 , 6 )
289- val aggregationTsRaw = percentileRanksAggregation(" aggregation" , TestSubDocument .intField.raw, 5 , 6 )
287+ val aggregation = percentileRanksAggregation(" aggregation" , " testField" , 5 , 6 )
288+ val aggregationTs = percentileRanksAggregation(" aggregation" , TestSubDocument .intField, 5 , 6 )
289+ val aggregationTsRaw = percentileRanksAggregation(" aggregation" , TestSubDocument .intField.raw, 5 , 6 )
290290 val aggregationWithMissing =
291291 percentileRanksAggregation(" aggregation" , TestSubDocument .intField, 5 , 6 ).missing(20.0 )
292292
@@ -310,10 +310,10 @@ object ElasticAggregationSpec extends ZIOSpecDefault {
310310 )
311311 },
312312 test(" percentiles" ) {
313- val aggregation = percentilesAggregation(" aggregation" , " testField" )
314- val aggregationTs = percentilesAggregation(" aggregation" , TestSubDocument .intField)
315- val aggregationTsRaw = percentilesAggregation(" aggregation" , TestSubDocument .intField.raw)
316- val aggregationWithMissing = percentilesAggregation(" aggregation" , TestSubDocument .intField).missing(20.0 )
313+ val aggregation = percentilesAggregation(" aggregation" , " testField" )
314+ val aggregationTs = percentilesAggregation(" aggregation" , TestSubDocument .intField)
315+ val aggregationTsRaw = percentilesAggregation(" aggregation" , TestSubDocument .intField.raw)
316+ val aggregationWithMissing = percentilesAggregation(" aggregation" , TestSubDocument .intField).missing(20.0 )
317317 val aggregationWithPercents =
318318 percentilesAggregation(" aggregation" , TestSubDocument .intField).percents(75 , 90 , 99 )
319319 val aggregationWithAllParams =
@@ -445,14 +445,14 @@ object ElasticAggregationSpec extends ZIOSpecDefault {
445445 )
446446 },
447447 test(" terms" ) {
448- val aggregation = termsAggregation(" aggregation" , " testField" )
449- val aggregationTs = termsAggregation(" aggregation" , TestSubDocument .stringField)
450- val aggregationTsRaw = termsAggregation(" aggregation" , TestSubDocument .stringField.raw)
448+ val aggregation = termsAggregation(" aggregation" , " testField" )
449+ val aggregationTs = termsAggregation(" aggregation" , TestSubDocument .stringField)
450+ val aggregationTsRaw = termsAggregation(" aggregation" , TestSubDocument .stringField.raw)
451451 val aggregationWithOrders =
452452 termsAggregation(" aggregation" , TestSubDocument .stringField).orderByKeyDesc
453453 .orderBy(AggregationOrder (" test" , Desc ))
454454 .orderByCountAsc
455- val aggregationWithSize = termsAggregation(" aggregation" , TestSubDocument .stringField).size(10 )
455+ val aggregationWithSize = termsAggregation(" aggregation" , TestSubDocument .stringField).size(10 )
456456 val aggregationWithAllParams =
457457 termsAggregation(" aggregation" , TestSubDocument .stringField.suffix(" test" )).orderByCountDesc.orderByKeyAsc
458458 .size(5 )
@@ -538,8 +538,8 @@ object ElasticAggregationSpec extends ZIOSpecDefault {
538538 assert(aggregationTsRaw)(equalTo(ValueCount (name = " aggregation" , field = " stringField.raw" )))
539539 },
540540 test(" weightedAvg" ) {
541- val aggregation = weightedAvgAggregation(" aggregation" , " valueField" , " weightField" )
542- val aggregationTs = weightedAvgAggregation(" aggregation" , TestDocument .stringField, TestDocument .intField)
541+ val aggregation = weightedAvgAggregation(" aggregation" , " valueField" , " weightField" )
542+ val aggregationTs = weightedAvgAggregation(" aggregation" , TestDocument .stringField, TestDocument .intField)
543543 val aggregationTsRaw =
544544 weightedAvgAggregation(" aggregation" , TestDocument .stringField.raw, TestDocument .intField.raw)
545545 val aggregationWithValueMissing =
@@ -713,9 +713,9 @@ object ElasticAggregationSpec extends ZIOSpecDefault {
713713 assert(aggregation2.toJson)(equalTo(expected2.toJson))
714714 },
715715 test(" bucketSort" ) {
716- val aggregationWithFrom = bucketSortAggregation(" aggregation" ).from(5 )
717- val aggregationWithSize = bucketSortAggregation(" aggregation" ).size(5 )
718- val aggregationWithSort = bucketSortAggregation(" aggregation" ).sort(ElasticSort .sortBy(" aggregation2" ))
716+ val aggregationWithFrom = bucketSortAggregation(" aggregation" ).from(5 )
717+ val aggregationWithSize = bucketSortAggregation(" aggregation" ).size(5 )
718+ val aggregationWithSort = bucketSortAggregation(" aggregation" ).sort(ElasticSort .sortBy(" aggregation2" ))
719719 val aggregationWithAllParams =
720720 bucketSortAggregation(" aggregation" ).sort(ElasticSort .sortBy(" aggregation2" )).from(5 ).size(7 )
721721
@@ -818,10 +818,10 @@ object ElasticAggregationSpec extends ZIOSpecDefault {
818818 assert(aggregationWithMissing.toJson)(equalTo(expectedWithMissing.toJson))
819819 },
820820 test(" extendedStats" ) {
821- val aggregation = extendedStatsAggregation(" aggregation" , " testField" )
822- val aggregationTs = extendedStatsAggregation(" aggregation" , TestSubDocument .intField)
823- val aggregationWithMissing = extendedStatsAggregation(" aggregation" , TestSubDocument .intField).missing(20.0 )
824- val aggregationWithSigma = extendedStatsAggregation(" aggregation" , TestSubDocument .intField).sigma(3.0 )
821+ val aggregation = extendedStatsAggregation(" aggregation" , " testField" )
822+ val aggregationTs = extendedStatsAggregation(" aggregation" , TestSubDocument .intField)
823+ val aggregationWithMissing = extendedStatsAggregation(" aggregation" , TestSubDocument .intField).missing(20.0 )
824+ val aggregationWithSigma = extendedStatsAggregation(" aggregation" , TestSubDocument .intField).sigma(3.0 )
825825 val aggregationWithMissingAndSigma =
826826 extendedStatsAggregation(" aggregation" , TestSubDocument .intField).missing(20.0 ).sigma(3.0 )
827827
@@ -891,8 +891,8 @@ object ElasticAggregationSpec extends ZIOSpecDefault {
891891 assert(aggregationWithMissingAndSigma.toJson)(equalTo(expectedWithMissingAndSigma.toJson))
892892 },
893893 test(" filter" ) {
894- val query = term(TestDocument .stringField, " test" )
895- val aggregation = filterAggregation(" aggregation" , query)
894+ val query = term(TestDocument .stringField, " test" )
895+ val aggregation = filterAggregation(" aggregation" , query)
896896 val aggregationWithSubAggregation =
897897 filterAggregation(" aggregation" , query).withSubAgg(minAggregation(" subAggregation" , TestDocument .intField))
898898 val aggregationWithMultipleSubAggregations = filterAggregation(" aggregation" , query)
@@ -1146,8 +1146,8 @@ object ElasticAggregationSpec extends ZIOSpecDefault {
11461146 assert(aggregationWithSubAggregation.toJson)(equalTo(expectedWithSubAggregation.toJson))
11471147 },
11481148 test(" percentileRanks" ) {
1149- val aggregation = percentileRanksAggregation(" aggregation" , " testField" , 5 , 6 )
1150- val aggregationTs = percentileRanksAggregation(" aggregation" , TestSubDocument .intField, 5 , 6 )
1149+ val aggregation = percentileRanksAggregation(" aggregation" , " testField" , 5 , 6 )
1150+ val aggregationTs = percentileRanksAggregation(" aggregation" , TestSubDocument .intField, 5 , 6 )
11511151 val aggregationWithMissing =
11521152 percentileRanksAggregation(" aggregation" , TestSubDocument .intField, 5 , 6 ).missing(20.0 )
11531153
@@ -1193,11 +1193,11 @@ object ElasticAggregationSpec extends ZIOSpecDefault {
11931193 assert(aggregationWithMissing.toJson)(equalTo(expectedWithMissing.toJson))
11941194 },
11951195 test(" percentiles" ) {
1196- val aggregation = percentilesAggregation(" aggregation" , " testField" )
1197- val aggregationTs = percentilesAggregation(" aggregation" , TestDocument .intField)
1196+ val aggregation = percentilesAggregation(" aggregation" , " testField" )
1197+ val aggregationTs = percentilesAggregation(" aggregation" , TestDocument .intField)
11981198 val aggregationWithPercents =
11991199 percentilesAggregation(" aggregation" , TestDocument .intField).percents(75 , 90 , 99 )
1200- val aggregationWithMissing = percentilesAggregation(" aggregation" , TestDocument .intField).missing(20.0 )
1200+ val aggregationWithMissing = percentilesAggregation(" aggregation" , TestDocument .intField).missing(20.0 )
12011201 val aggregationWithAllParams =
12021202 percentilesAggregation(" aggregation" , TestDocument .intField).percents(75 , 90 , 99 ).missing(20.0 )
12031203
@@ -1401,10 +1401,10 @@ object ElasticAggregationSpec extends ZIOSpecDefault {
14011401 assert(aggregationWithMissing.toJson)(equalTo(expectedWithMissing.toJson))
14021402 },
14031403 test(" terms" ) {
1404- val aggregation = termsAggregation(" aggregation" , " testField" )
1405- val aggregationTs = termsAggregation(" aggregation" , TestDocument .stringField)
1406- val aggregationWithOrder = termsAggregation(" aggregation" , TestDocument .stringField).orderByKeyDesc
1407- val aggregationWithSize = termsAggregation(" aggregation" , TestDocument .stringField).size(10 )
1404+ val aggregation = termsAggregation(" aggregation" , " testField" )
1405+ val aggregationTs = termsAggregation(" aggregation" , TestDocument .stringField)
1406+ val aggregationWithOrder = termsAggregation(" aggregation" , TestDocument .stringField).orderByKeyDesc
1407+ val aggregationWithSize = termsAggregation(" aggregation" , TestDocument .stringField).size(10 )
14081408 val aggregationWithAllParams = termsAggregation(" aggregation" , TestDocument .stringField)
14091409 .orderBy(AggregationOrder (" test" , SortOrder .Asc ))
14101410 .size(20 )
@@ -1508,8 +1508,8 @@ object ElasticAggregationSpec extends ZIOSpecDefault {
15081508 assert(aggregationTs.toJson)(equalTo(expectedTs.toJson))
15091509 },
15101510 test(" weightedAvg" ) {
1511- val aggregation = weightedAvgAggregation(" aggregation" , " valueField" , " weightField" )
1512- val aggregationTs = weightedAvgAggregation(" aggregation" , TestDocument .stringField, TestDocument .stringField)
1511+ val aggregation = weightedAvgAggregation(" aggregation" , " valueField" , " weightField" )
1512+ val aggregationTs = weightedAvgAggregation(" aggregation" , TestDocument .stringField, TestDocument .stringField)
15131513 val aggregationWithValueMissing =
15141514 weightedAvgAggregation(" aggregation" , TestDocument .stringField, TestDocument .intField).valueMissing(2.0 )
15151515 val aggregationWithWeightMissing =
0 commit comments