Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
a.usenko committed Jan 16, 2024
1 parent 3c18702 commit b54baa4
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,14 @@ class PreparedFacetExpressionFilter(
searchQueryResult.aggs

val results = facetFilterExprs.map { facetFilterExpr ->
val filterAgg = parsedAggs[makeAggName(facetFilterExpr.name)] as LongValueAggResult
val filterAgg = parsedAggs[makeAggName(facetFilterExpr.name)]
val docCount = if (filterAgg is SingleBucketAggResult)
filterAgg.docCount
else (filterAgg as LongValueAggResult).value
FaceExpressionValue(
facetFilterExpr.name,
selectedNames.contains(facetFilterExpr.name),
filterAgg.value
docCount
)
}

Expand Down

0 comments on commit b54baa4

Please sign in to comment.