Skip to content

dex recommends incorrect index #24

Open
rl-ilasic opened this Issue Jan 23, 2014 · 1 comment

2 participants

@rl-ilasic

When I run dex during mongodump i get a recommendation to insert below index into my collections.

{
    "key" : {
        "query" : 1,
        "$snapshot" : 1
    },
    "collection" : "reportDetail"
},

Feedback from MongoDB support on the recommended index:

Dex is confused and wrong. That is not an index you should create. You may want to file an issue with them if you are active there.

@esedor
esedor commented Jan 23, 2014

Your assertion is absolutely correct. This is wrong and should not be created. At-issue is the nitty code in parsers.QueryLineHandler.standardize_query, https://github.com/mongolab/dex/blob/master/dex/parsers.py#L206.

The logic is faulty owing to the inconsistent logging of $query vs. query, $sort vs, sort, and the the inclusion of special indicators like $cmd, $snapshot. Because this involves various versions of logs, and differences per operation, it is taking longer to plan a fix than I would like; therefore any suggestions are appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.