Github user mattyb149 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2180#discussion_r160452672
  
    --- Diff: 
nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/AbstractMongoProcessor.java
 ---
    @@ -95,15 +100,36 @@
     
         public static final PropertyDescriptor WRITE_CONCERN = new 
PropertyDescriptor.Builder()
                 .name("Write Concern")
    +            .displayName("Write Concern")
                 .description("The write concern to use")
                 .required(true)
                 .allowableValues(WRITE_CONCERN_ACKNOWLEDGED, 
WRITE_CONCERN_UNACKNOWLEDGED, WRITE_CONCERN_FSYNCED, WRITE_CONCERN_JOURNALED,
                         WRITE_CONCERN_REPLICA_ACKNOWLEDGED, 
WRITE_CONCERN_MAJORITY)
                 .defaultValue(WRITE_CONCERN_ACKNOWLEDGED)
                 .build();
     
    +    static final PropertyDescriptor RESULTS_PER_FLOWFILE = new 
PropertyDescriptor.Builder()
    +            .name("results-per-flowfile")
    +            .displayName("Results Per FlowFile")
    +            .description("How many results to put into a flowfile at once. 
The whole body will be treated as a JSON array of results.")
    +            .required(false)
    +            .addValidator(StandardValidators.POSITIVE_INTEGER_VALIDATOR)
    +            .defaultValue("1")
    +            .build();
    +
    +    static final PropertyDescriptor BATCH_SIZE = new 
PropertyDescriptor.Builder()
    +            .name("Batch Size")
    +            .displayName("Batch Size")
    +            .description("The number of elements returned from the server 
in one batch")
    +            .required(false)
    +            .addValidator(StandardValidators.POSITIVE_INTEGER_VALIDATOR)
    +            .defaultValue("1")
    +            .build();
    +
         static List<PropertyDescriptor> descriptors = new ArrayList<>();
    --- End diff --
    
    Do you think the user would want to have the aggregation query as an 
attribute in the outgoing results flow file? This came up with ExecuteSQL a 
little while ago, and I thought for that one (and perhaps this one) we could 
provide an optional property for a Query Attribute or something, and if it was 
populated we would store the executed query in the provided attribute name. 
Thoughts?


---

Reply via email to