title: spring data Mongo db aggregation
body: <p>I use the following aggregation to count "alertsources" on document "alert" that has a specifique  "alertsources.date_creation" but I don't know why it counts all the alertsources instead of those who has the criteria :</p>
  
  <pre><code>final Aggregation aggregation = Aggregation.newAggregation(
                  Aggregation.match(Criteria.where("alertsources.date_creation").regex(date)),
                  Aggregation.match(Criteria.where("descA").is(alertName)),
  
                  //regex(".*"+date+".*")
                  Aggregation.unwind("alertsources"),
                  Aggregation.unwind("descA"),
                  Aggregation.group().count().as("count"));
  
          //System.out.println("----------"+mongoTemplate.aggregate(aggregation, Alert.class, MentionCount.class).getRawResults()+"-----");
          List&lt;MentionCount&gt; agregResult = mongoTemplate.aggregate(aggregation, Alert.class, MentionCount.class).getMappedResults();
  </code></pre>