[13:36:50] <nishu-tryinghard> how can i make sure of getting the total count of the documents and also the filter count i.e after $match in a single aggregate query in mongo. I know of a way to do this by using 3 queries but i think there must be a better way to do it. 1) get the count of the collection 2) after match get the count by group by 3) get the actual results. Here is the query which iam using at present https://gist.github.com/nishugit/4605a8f61243abe95f15eadbb0
[15:31:53] <deathanchor> for regexes in mongodb you usually just do { 'type' : /normal/i }, but depending which programming language you might have to do soemthing different
[15:34:02] <Derick> deathanchor: on the shell, yes. For drivers, you need to wrap it in an object.
[15:34:47] <deathanchor> yeah depends on what is being used. It's different for php and python, I don't recognize what his code is. Perhaps Perl?
[17:25:44] <YokoBR> how do I use regex into an array
[17:26:19] <YokoBR> $search = $this->mongodb->reader( 'efforts', false, ['tags' => ['$regex'=>$tag, '$options'=> 'i']]); this works for a simple row, but not an array.
[19:38:35] <qswz> is it just me, or we can't connect to a local mongodb when offline?
[19:39:09] <qswz> I had no connection today, and couldn't connect with the local mongod
[21:58:46] <TehGrub> its a strange issue i will try to explain
[22:00:38] <TehGrub> so i have these objects in a collection and inside these objects is an array. and the array is a json array, and one of them variables inside this array is a number. and i want to do a less than, sort and limit on this array
[22:07:58] <TehGrub> i want to perform a lessThan search inside the number. and say i have a 1000 in that "myarray" array. i would like to be able to get lessThan a certain number and then do a sort or a limit without calling this full object into view. How can i do this?
[22:21:43] <bros> How can I call a stored function during an aggregation?
[23:10:02] <bros> I got a really good one. https://gist.github.com/skulabs/8287174d9b0a5631172a74bf846d88e0 How can I do this better with the database?
[23:27:25] <qswz> ObjectId('5745f3cdaa93a8de31c4a0a0')==ObjectId('5745f3cdaa93a8de31c4a0a0') I guess this is false