Skip to content
This repository was archived by the owner on Apr 21, 2020. It is now read-only.
This repository was archived by the owner on Apr 21, 2020. It is now read-only.

Allow aggregate method with opt #6

@amz

Description

@amz
            MongoQueryParser parser = new MongoQueryParser();
            MongoQuery mongoQuery = parser.parse(longQuery, new HashMap());
            BasicDBList dbObjList = mongoQuery.execute(db);

Query is an aggregation: db.events.aggregate([....])

I have an exception: Caused by: com.mongodb.MongoCommandException: Command failed with error 16945: 'Exceeded memory limit for $group, but didn't allow external sort. Pass allowDiskUse:true to opt in.

When i try to pass it like: db.events.aggregate([....],{ allowDiskUse: true }) then i have an exception:
java.lang.RuntimeException: invalid query
at com.ee.dynamicmongoquery.MongoQueryParser.parse(MongoQueryParser.scala:31)
at com.ee.dynamicmongoquery.MongoQueryParser.parse(MongoQueryParser.scala:27)
......
Caused by: java.lang.ClassCastException: null

How can i pass allowDiskUse:true to query?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions