Explain Plan and query to work on all valid queries -- if an official driver works the Compass should be able to help debugging
Mongo Compass Explain Plan cannot work on queries which are using common Java available syntax. Having no way to use Explain Plan on valid queries, without modifying the query, should be a feature.
{ "_id" : { "$in": [{ "$binary" : "6Uk1UVZWl+krPObxzA3wtg==", "$type" : "03" },{ "$binary" : "60Xp1sJ9nMiT6cPy3GA1ig==", "$type" : "03" }] } }
should be a valid query in Mongo Compass since it is in Java AND the following error which is returned from both query area and Mongo Compass Explain Plan should not occur for such a query:
cannot nest $ under $in
One should NOT have to change the query from what a client program naturally uses (the dollar signs) to
{ "_id" : { "$in": [ BinData(3, "6Uk1UVZWl+krPObxzA3wtg=="), BinData(3, "60Xp1sJ9nMiT6cPy3GA1ig==") ] } }
I suspect that this change would be to augment the underlying query language, but, the exact implementation to having a tool which can tell me whether the exact query Java is using will be using the index is something which would be up to Mongo Corporation debate.
![](https://secure.gravatar.com/avatar/7bf845cad73f8a4cd50884fd4e3e29b4?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)