2

I have a collection in mongodb where i can't create an index

this is a field, i want make index.

"indexContents" : ["‘", "‘e", "‘ea", "‘eat", "e", "ea", "eat", "a", "at", "t", "&", "d", "dr", "dri", "drin", "drink", "drink’", "r", "ri", "rin", "rink", "rink’", "i", "in", "ink", "ink’", "n", "nk", "nk’", "k", "k’", "’"]

what's wrong in my field?

I can index, title, street, everything just fine.

However when I created index that contain indexContents I got this error:

Wed Aug 29 05:50:33 Socket recv() errno:104 Connection reset by peer 127.0.0.1:27017
Wed Aug 29 05:50:33 SocketException: remote: 127.0.0.1:27017 error: 9001 socket exception [1] server [127.0.0.1:27017]
Wed Aug 29 05:50:34 DBClientCursor::init call() failed
Wed Aug 29 05:50:34 query failed : hello.$cmd { getlasterror: 1.0 } to: 127.0.0.1
Wed Aug 29 05:50:34 Error: error doing query: failed shell/collection.js:151
Wed Aug 29 05:50:34 trying reconnect to 127.0.0.1
Wed Aug 29 05:50:34 reconnect 127.0.0.1 failed couldn't connect to server 127.0.0.1

I think one of the data is "messed up" but which one out of 1.6 million data?

update: I already repairDatabase but i got the same resutl, can't create indexContent

Notice other ensure index is fine.

For example, I can index indexContents alone fine

I can index {LongitudeLatitude:"2d",Prominent:1}

{indexContents:1} fine

Things fail if when I tried to index

{LongitudeLatitude:"2d",indexContents:1,Prominent:1}

4

0 回答 0