private FeedOptions getFeedOptions(String key) { if (useSinglePartitionCollection) { return null; } FeedOptions feedOptions = new FeedOptions(); if (this.useHashQueryForScan) { feedOptions.setEnableCrossPartitionQuery(false); feedOptions.setPartitionKey(new PartitionKey(key)); } else { feedOptions.setEnableCrossPartitionQuery(true); feedOptions.setMaxDegreeOfParallelism(this.maxDegreeOfParallelismForQuery); } return feedOptions; }
FeedOptions options = new FeedOptions(); options.setEnableCrossPartitionQuery(true); options.setMaxDegreeOfParallelism(Integer.MAX_VALUE);