You can turn on searching option
Internally Lucene search engine is used
When you insert documents to Mongodb they are automatically added to search engine
It's optimized and only "_id" field is added to Lucene search
Full document is stored only in Mongodb
Search index flushed to disk automatically when lucene buffer is full or there were X documents added to search index
Before search index committed, whatever lucene keeps in buffers can not be searched
To commit search index manually you can do
curl -i "mongohost:port/search?op=commit"