[OpenSIPS-Users] MongoDB bug
Vlad Paiu
vladpaiu at opensips.org
Mon May 13 10:29:22 CEST 2013
Hello,
Can you please paste here the full debugging log received while trying
to run that query ?
Best Regards,
Vlad Paiu
OpenSIPS Developer
http://www.opensips-solutions.com
On 05/12/2013 10:26 PM, kamika wrote:
> Hello
>
> I just found maybe the Bug in MongoDB Module. In order to have scalable
> system i have used Perl and ran Mongo connection under Perl when the latest
> version was 1.8. MondoDB driver for Perl itself has problems in its code and
> by now was not resolved by developers. Now, when 1.9 is released i tried to
> set native opensips's MongoDB Module with json and use raw query. Then I
> found that it cannot execute the following query:
>
> cache_raw_query("mongodb","{ \"op\" : \"find\", \"query\": {\"phone\":
> 77073517003}, \"fields\": {\"id\":1,\"email\":1}}","$avp(mongo_result)");
>
> However the following query executes successfully under Mongo CLI:
> db.users.find({phone:77072517003},{"id":1,"email":1})
> { "_id" : ObjectId("51866650f1ac4fc22100050e"), "email" :
> "kamil.nigmatullin at xxx.xx", "id" : NumberLong(668) }
>
> If i modify key in query as follows:
> cache_raw_query("mongodb","{ \"op\" : \"find\", \"query\": {\"id\": 668},
> \"fields\": {\"id\":1,\"email\":1}}","$avp(mongo_result)");
> then query runs successfully and I am geting my results in
> $avp(mongo_result).
>
> We use all phones as Integers in Mongodb to ease Inedex development and
> quicken searches. I think it is something with NumberLong. I have special
> account with phone 1 and it runs perfectly good. Debug do not show anything
> exept that nothing was fetched from mongodb.
>
> Thank you.
>
>
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/MongoDB-bug-tp7586282.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
More information about the Users
mailing list