After updating from 2.4.5 to 2.6rc1 in a local environment, we tested the next query:
{ "namespace" : "rsvcom", "active" : true, "$or" : [{ "keywords.names" : /^hotel/ }, { "keywords.extended" : { "$all" : [/^hotel/] } }], "searchable" : true, "type" : "EA" }
The collection "suggest" has 2.414.690 documents with a size of 2.5gb and a index size of 3.4gb.
The output of db.suggest.getIndexes() is here:
https://gist.github.com/wiliame/4439872fa5e3741163d5
And the issue comes with the index selector, the query is taking more than 20 seconds, sometimes some minutes to finish because is scanning all the documents.
Explain of the query in the 2.6rc1:
https://gist.github.com/wiliame/391289227b62871ab0e4
Explain of the query in the 2.4.5:
https://gist.github.com/wiliame/414c22f0c6f6981fbea9
And the output is not the expected.
To finish, this are some example documents:
https://gist.github.com/wiliame/56c771b422f27fe0ed95