From a7c86e003d182d0bd617896ec9d3f31518542f67 Mon Sep 17 00:00:00 2001 From: imedina Date: Fri, 13 Dec 2024 11:59:59 +0000 Subject: [PATCH] mongodb: fix aggregation regex --- .../opencb/commons/datastore/mongodb/MongoDBQueryUtils.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/commons-datastore/commons-datastore-mongodb/src/main/java/org/opencb/commons/datastore/mongodb/MongoDBQueryUtils.java b/commons-datastore/commons-datastore-mongodb/src/main/java/org/opencb/commons/datastore/mongodb/MongoDBQueryUtils.java index f81572e0..1ad7b7bc 100644 --- a/commons-datastore/commons-datastore-mongodb/src/main/java/org/opencb/commons/datastore/mongodb/MongoDBQueryUtils.java +++ b/commons-datastore/commons-datastore-mongodb/src/main/java/org/opencb/commons/datastore/mongodb/MongoDBQueryUtils.java @@ -748,9 +748,8 @@ private static List createFacet(Bson query, List 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 {