-
Type:
Bug
-
Resolution: Duplicate
-
Priority:
Major - P3
-
None
-
Affects Version/s: 1.8.0
-
Component/s: Index Maintenance
-
Environment:Windows x64
-
ALL
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
I have inserted a record with a value greater than 850 characters.
> db.testcol.insert({_id:"len850",v:"http://frame.allposters.com/frameimagehandler/universal/frameimage.jpg?frame=[FAP:0+PRT:[PAP=3945180|PRW=24|PRH=36|PIP=%5c28%5c2810%5cZQIOD00Z.jpg|LFN=GBGN0439.jpg|LFL=|PWL=300|PHL=450|PWO=2397|PHO=3596]+MLD:[MID=1153331|MIP=|MDW=1|MDH=0.5625]+GLS:0+NMM:0+MT1:[MTD=0|MTP=|MTC=|MTL=0|MTT=0|MTR=0|MTB=0|MDP=0.2|MBV=0.08]+MT2:[MTD=0|MTP=|MTC=|MTL=0|MTT=0|MTR=0|MTB=0|MDP=0.2|MBV=0.08]+MT3:[MTD=0|MTP=|MTC=|MTL=0|MTT=0|MTR=0|MTB=0|MDP=0.2|MBV=0.08]+CRP:[CID=0|CRX=0|CRY=0|CRW=0|CRH=0]+LIN:[LID=0|LFN=|LNW=0|LND=0]+CAN:[CVD=0|CVC=|CVF=|CVS=0|ECR=|ECB=|BKC=|EDW=0|CTX=1|GWP=0]+MLF:[FLD=0|FLW=0|FFP=]+LNF:[FLD=0|FLW=0|FFP=]+TMF:[FLD=0|FLW=0|FFP=]+MMF:[FLD=0|FLW=0|FFP=]+BMF:[FLD=0|FLW=0|FFP=]+FDP:0+MXD:1000+MXW:1244+MXH:492+SHI:5+WMT:APC+QLT:85+OVH:[TOH=0.25|ROH=0.25|BOH=0.25|LOH=0.25]+CRZ:[CZT=0|CRI=4|LPC=0|TPC=0|WPC=0|HPC=0|CMD=0]+RTP:[RID=0|RFC=FFFFFF" });
After that I have used a regular expression to see if the record exists and it returns the record
> db.testcol.find(
);
I have added an index on the column with the following command
> db.testcol.ensureIndex(
{v:1});
I reissued the same regular expression and returns no records. If I remove the index, the results are returned.
> db.testcol.find(
);
This issue happens for any value greater than 800+. I am not exactly sure what exact character length the index causes the regular expression to fail.