MongoDB create index crash!

Hello everyone,
I have a problem when creating an index in Mongodb, the collection is many GB, the document contains about 100 million data, trying to create an index on it gives me the following error:

Error: error doing query: failed: network error while attempting to run command 'createIndexes' on 
host ''

I am trying them all from both shell and compass:

db.collection1.createIndex({test: "text"})
db.collection1.createIndex({"test": 1},{unique:false})
db.collection1.createIndex({"test": 1},{sparse: true})
db.collection1.createIndex({test: 1},{background:true, sparse:true })

I also tried to reinsert the data into the collection, recreating it completely, and each time the index crashes around 1GB of creation. How could I solve? Where am I wrong in your opinion? Thank you all!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.