public CommandResult explainAggregate ( final List < ? extends DBObject > pipeline , final AggregationOptions options ) { AggregateOperation < BsonDocument > operation = new AggregateOperation < BsonDocument > ( getNamespace ( ) , preparePipeline ( pipeline ) , new BsonDocumentCodec ( ) ) . maxTime ( options . getMaxTime ( MILLISECONDS ) , MILLISECONDS ) . allowDiskUse ( options . getAllowDiskUse ( ) ) . collation ( options . getCollation ( ) ) . retryReads ( retryReads ) ; return new CommandResult ( executor . execute ( operation . asExplainableOperation ( ExplainVerbosity . QUERY_PLANNER ) , primaryPreferred ( ) , getReadConcern ( ) ) ) ; }
Return the explain plan for the aggregation pipeline .