I am using MongoDB to store around 20 Crore documents.
A sample of the document in my collection looks like this:
{"key1":"value1","key2":"value2","date":"2015-08-19 12:58:00","key3":"value3",........,....}
There are around 20 key-value pairs in a document.
Among them the date is stored like this : "date":"2015-08-19 12:58:00". I want to find documents corresponding to one day. i.e. for example the documents corresponding 2015-08-19.
I am also using pandas to convert the documents into a dataframe format. So I used the following commands:
regx = re.compile("2015-08-01\s[012][0-9]:[0-5][0-9]:[0-5][0-9]")
click_data_sample=pd.DataFrame(list(coll1.find({"date":regx})))
I have indexed the date key in MongoDb.
But its taking a lot of time. I have been waiting for half an hour now, but still no result.
Please help!!
Thanks in advance!!