Created
April 14, 2021 12:43
-
-
Save venkatsgithub1/c308ecf0f88143803ce262d1b80e99a9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Arrays; | |
import static com.mongodb.client.model.Filters.eq; | |
import static com.mongodb.client.model.Aggregates.group; | |
import static com.mongodb.client.model.Accumulators.sum; | |
Arrays.asList(group(eq("$substr", Arrays.asList("$title", 3L, -1L)), sum("count", 1L))); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment