Skip to content

Commit

Permalink
mongodb: fix aggregation regex
Browse files Browse the repository at this point in the history
  • Loading branch information
imedina committed Dec 13, 2024
1 parent b15ed9a commit a7c86e0
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -748,9 +748,8 @@ private static List<Bson> createFacet(Bson query, List<String> facetFields) {
}
} else {
// 4. Facet with count as default accumulator
// TODO extract the right field
if (facetField.contains(":")) {
String[] split = facetField.split("[:\\(\\)]");
String[] split = facetField.split("[:()]");
accumulator = Accumulator.valueOf(split[1]);
accumulatorField = split[2];
} else {
Expand Down

0 comments on commit a7c86e0

Please sign in to comment.