I am developing an app whose data repo is MongoDB. I have only 2 collections in the database say A and B.
There is only one type of transaction which happens from the application layer. This transaction produces 2 queries and these 2 queries hits the collection A and gets some data. Lets say it as AR1 and AR2. I need to perform some logic in AR1 and AR2 and come up with pAR1 and pAR2.
I am creating a run time collection and inserting pAR1 and pAR2 into it perform a text search and send the result to the APP server. Once the data is sent to the app server, I am deleting the collection which got created
This is a cycle.
Question 1: I expect a lot of transaction hitting the db. Say 100 transactions per minute. If thats the case, 100 unique named collections will be created at run time and once all transaction are completed these 100 created collections will be destroyed by using the drop command.
It works fine for a single transaction and I am happy. But I wish to ask you all whether this design is good and healthy. Will the drop command deletes the collection which got created ( and wipe of any traces of the collection and no memory gets build up ) and stuff up the server machine holding the database.
Question2: I saw in MongoDB website that the text search functionality should not be used in production environment. I am not sure why it is ? the app is a text search engine. Can any one give me some pointers like if it is used ( text search feature) what are all the necessary precautions I can take)
Thanks a lot for your time and effort in answering my query.