-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Environment:pymongo 2.8
I am trying to use the hint command for my queries. Unfortuately I do not know the proper format for using 'hint' on a compound index in pymongo.
I have gotten it to work successfully on the mongodriver using robomongo:
command using robomongo:
Hint using index name: db.seqs.find({'DATA.CDR3.AA':{$exists:true},'EXP_ID':{$in:[ObjectId("552c261b9eb6363a487b62ca")]).hint('EXP_ID_1_SEQ_ID_1_ANALYSIS_NAME_1',
)
Hint using index: db.seqs.find({'DATA.CDR3.AA':{$exists:true},'EXP_ID':{$in:[ObjectId("552c261b9eb6363a487b62ca")]).hint(
{'EXP_ID':1,'SEQ_ID':1,'ANALYSIS_NAME':1},
{'DATA.CDR3.AA':1})
What would be the equivalent of these commands using pymongo 2.8 and further??