> db.collection.dropIndexes()
{
"nIndexesWas" : 3,
"msg" : "non-_id indexes dropped for collection",
"ok" : 1
}
> db.runCommand({insert: 'system.indexes', documents: [ { key: {b: 1}, name: 'b_1', ns: 'test.collection' } ] })
{ "ok" : 1, "n" : 1 }
> db.collection.getIndexes()
[
{
"v" : 1,
"key" : {
"_id" : 1
},
"name" : "_id_",
"ns" : "test.collection"
},
{
"v" : 1,
"key" : {
"b" : 1
},
"name" : "b_1",
"ns" : "test.collection"
}
]
> db.serverBuildInfo()
{
"version" : "2.6.0-rc2-pre-",
"gitVersion" : "d8eb19991b01f9fc5e73f0a3acd3f8a59e2d7c7d",
"OpenSSLVersion" : "",
"sysInfo" : "Darwin As-MacBook-Pro-2.local 13.1.0 Darwin Kernel Version 13.1.0: Thu Jan 16 19:40:37 PST 2014; root:xnu-2422.90.20~2/RELEASE_X86_64 x86_64 BOOST_LIB_VERSION=1_49",
"loaderFlags" : "-fPIC -pthread -Wl,-bind_at_load -fstack-protector -mmacosx-version-min=10.6",
"compilerFlags" : "-Wnon-virtual-dtor -Woverloaded-virtual -fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -Werror -pipe -O0 -fstack-protector -Wno-unused-function -Wno-unused-private-field -Wno-deprecated-declarations -Wno-tautological-constant-out-of-range-compare -mmacosx-version-min=10.6",
"allocator" : "tcmalloc",
"versionArray" : [
2,
6,
0,
-8
],
"javascriptEngine" : "V8",
"bits" : 64,
"debug" : true,
"maxBsonObjectSize" : 16777216,
"ok" : 1
}