Re: Camel Mongodb sorting with allowDiskUse not working

2020-10-01 Thread Pasquale Congiusti
Hi there, it seems that the "allowDiskUse" was originally implemented for aggregate operation and Camel MongoDB component support it. Since Mongo DB 4.4 the same property is used for sort operation [1] and this is not yet implemented by Camel MongoDB component. You can log a request on Apache Camel

Re: Camel Mongodb sorting with allowDiskUse not working

2020-09-30 Thread Site Register
It works with below sample codes by using aggregate: List aggregate = Arrays.asList(Aggregates.match(Filters.gt("fieldname", value))); exchange.getIn().setHeader(MongoDbConstants.SORT_BY, Sorts.ascending("fieldname")); exchange.getIn().setHeader(MongoDbConstants.ALLOW_DISK_USE, true); exchange.g

Re: Camel Mongodb sorting with allowDiskUse not working

2020-09-30 Thread Jan Bednář
Hi, allowDiskUse have been dedicated exclusively for aggregation. Support for this flag for find operations have been added to MongoDB Server recently with version 4.3.1. You need to rewrite findAll to aggragation - it is quite simple. I have logged https://issues.apache.org/jira/projects/CAME

Camel Mongodb sorting with allowDiskUse not working

2020-09-30 Thread Site Register
Hi all, I got below error message when I was trying to sort on huge mongodb collection data even I turn on allowDiskUse to true. Any suggestions? "Query failed with error code 292 and error message 'Executor error during find command :: caused by :: Sort exceeded memory limit of 104857600 bytes,