title: How to use Aggregation Query with MongoItemReader in spring batch
body: <p>Some how the requirement changed and I have to use aggregation query insted of basic query in setQuery(). Is this even possible? 
  Please suggest how can i do that? My Aggregation query is ready but not sure how can I use that in spring batch</p>
  
  <pre><code>public ItemReader&lt;ProfileCollection&gt; searchMongoItemReader() throws Exception, UnexpectedInputException, ParseException, NonTransientResourceException {
  
          MongoItemReader&lt;MyCollection&gt; mongoItemReader = new MongoItemReader&lt;&gt;();
          mongoItemReader.setTemplate(myMongoTemplate);
          mongoItemReader.setCollection(myMongoCollection);
  
          mongoItemReader.setQuery(" Some Simple Query - Basic");
  
          mongoItemReader.setTargetType(MyCollection.class);
          Map&lt;String, Sort.Direction&gt; sort = new HashMap&lt;&gt;();
          sort.put("field4", Sort.Direction.ASC);
          mongoItemReader.setSort(sort);
          return mongoItemReader;
  
      }
  </code></pre>