Hi everybody,
I normally use MongoDB as DB engine in my projects and I would like to get all MongoDB advantages when working with Kamailio. For this reason, I need to deal with arrays of information inside a document (for example, an array of contacts inside a document).
And now the question: is it possible to insert, update and search info in a MongoDB document by using arrays via srdb1 lib? If yes, how? And if not, are you thinking about implementing it in the future?
Thank you very much for your time.
Regards, Mario
Hi Henning,
Thank you very much for your reply. I have a question: what do you mean when you talk about using ndb_mongodb module? Do you mean to use it from the configuration file or inside a module code? Our use case is to save all contacts related to an AOR in the same MongoDB document as an array in order to have all information inside a document and avoid the use of indexes. But, of course, we want to use the 'save' function (from registrar module) and not to launch either raw queries or ndb_mongodb commands, if possible.
Regards, Mario
Hello Mario,
if you want to use standard modules like usrloc and registrar, you need to use the db_mongodb module. This is naturally limited in its support of the mongodb specialities. If you want to get better support, you can of course use the ndb_mongodb module. You can find details about how to use it from the cfg script in the module readme.
Cheers,
Henning