diff --git a/modules/integration/src/test/scala/zio/elasticsearch/HttpExecutorSpec.scala b/modules/integration/src/test/scala/zio/elasticsearch/HttpExecutorSpec.scala index b53130fe1..a24b849a4 100644 --- a/modules/integration/src/test/scala/zio/elasticsearch/HttpExecutorSpec.scala +++ b/modules/integration/src/test/scala/zio/elasticsearch/HttpExecutorSpec.scala @@ -148,12 +148,10 @@ object HttpExecutorSpec extends IntegrationSpec { .refreshTrue ) query = term(field = TestDocument.stringField, value = secondDocumentUpdated.stringField.toLowerCase) - aggregation = filterAggregation(name = "aggregation", query = query).withSubAgg( maxAggregation("subAggregation", TestDocument.intField) ) - aggsRes <- Executor .execute(ElasticRequest.aggregate(selectors = firstSearchIndex, aggregation = aggregation)) diff --git a/modules/library/src/main/scala/zio/elasticsearch/executor/response/AggregationResponse.scala b/modules/library/src/main/scala/zio/elasticsearch/executor/response/AggregationResponse.scala index 554b64d6f..0bbac5b29 100644 --- a/modules/library/src/main/scala/zio/elasticsearch/executor/response/AggregationResponse.scala +++ b/modules/library/src/main/scala/zio/elasticsearch/executor/response/AggregationResponse.scala @@ -224,7 +224,6 @@ private[elasticsearch] final case class SumAggregationResponse(value: Double) ex private[elasticsearch] object SumAggregationResponse { implicit val decoder: JsonDecoder[SumAggregationResponse] = DeriveJsonDecoder.gen[SumAggregationResponse] - } private[elasticsearch] final case class TermsAggregationResponse( diff --git a/modules/library/src/test/scala/zio/elasticsearch/ElasticAggregationSpec.scala b/modules/library/src/test/scala/zio/elasticsearch/ElasticAggregationSpec.scala index 733570b0e..f8b6ddc45 100644 --- a/modules/library/src/test/scala/zio/elasticsearch/ElasticAggregationSpec.scala +++ b/modules/library/src/test/scala/zio/elasticsearch/ElasticAggregationSpec.scala @@ -136,7 +136,7 @@ object ElasticAggregationSpec extends ZIOSpecDefault { filterAggregation("aggregation", query).withSubAgg(minAggregation("subAggregation", TestDocument.intField)) val aggregationWithMultipleSubAggregations = filterAggregation("aggregation", query) .withSubAgg(maxAggregation("maxSubAggregation", TestDocument.intField)) - .withSubAgg(minAggregation("minSubAggregation", TestDocument.intField)) + .withSubAgg(minAggregation("minSubAggregation", TestDocument.doubleField)) assert(aggregation)( equalTo( @@ -162,7 +162,7 @@ object ElasticAggregationSpec extends ZIOSpecDefault { name = "aggregation", query = query, subAggregations = Chunk( - minAggregation("minSubAggregation", TestDocument.intField), + minAggregation("minSubAggregation", TestDocument.doubleField), maxAggregation("maxSubAggregation", TestDocument.intField) ) ) @@ -777,7 +777,7 @@ object ElasticAggregationSpec extends ZIOSpecDefault { filterAggregation("aggregation", query).withSubAgg(minAggregation("subAggregation", TestDocument.intField)) val aggregationWithMultipleSubAggregations = filterAggregation("aggregation", query) .withSubAgg(maxAggregation("maxSubAggregation", TestDocument.intField)) - .withSubAgg(minAggregation("minSubAggregation", TestDocument.intField)) + .withSubAgg(minAggregation("minSubAggregation", TestDocument.doubleField)) val expected = """ @@ -835,7 +835,7 @@ object ElasticAggregationSpec extends ZIOSpecDefault { | }, | "minSubAggregation": { | "min": { - | "field": "intField" + | "field": "doubleField" | } | } | }