-
Type: Bug
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: 3.2.0
-
Component/s: Query Operations
-
None
When connected to a server whose version is <= 3.0, a $explain key added to FindOptions.modifiers will be included in the OP_QUERY document. But with the introduction of the find command in server 3.2, a $explain modifier must be converted into an explain command instead, as the find command does not support explain.
So this code:
MongoCollection<Document> collection = ... collection.find().modifiers(new Document("$explain", true)).first()
should return the query plan, but when connected to a 3.2 server, it does not. It will instead return the first document from a normal cursor on the collection.
- is related to
-
JAVA-2104 Add explain() capability for new Java driver API
- Closed