mongodb-ruby Questions

2

Solved

Is there a function in mongo to return the number of documents that were updated in an update statement? I have tried to use count() but apparently the update statement only returns true or false ...
Cyril asked 15/11, 2011 at 20:12

5

Solved

I am talking to multiple databases using Mongoid.override_database("database_name") using Mongoid with rails. How do I find the current database programmatically? Mongoid docs on sessions: http:/...
Polytrophic asked 23/10, 2012 at 21:15

3

Solved

I have a query that takes too long to finish. I like to do some performance tests but after I check for one time (that takes currently ~30 seconds) the query start to run a lot faster (< 1 secon...
Janejanean asked 20/2, 2012 at 14:35

4

Solved

I have an array, which is output by a map/reduce method performed by MongoDB, it looks something like this: [{"minute"=>30.0, "hour"=>15.0, "date"=>5.0, "month"=>9.0, "year"=>2011.0...
Transcendence asked 6/10, 2011 at 3:24

9

Solved

I've been for some help on getting the highest value on a column for a mongo document. I can sort it and get the top/bottom, but I'm pretty sure there is a better way to do it. I tried the follow...
Supertax asked 21/1, 2011 at 19:32

4

I am using MongoDB 1.6.3, to store a big collection (300k+ records). I added a composite index. db['collection_name'].getIndexes() [ { "name" : "_id_", "ns" : "db_name.event_logs", "key" : { ...

1

Solved

Assuming the following: irb> x irb> => {"_id"=> 123456, "welcome"=>"Hi!", "welcome2" => "Enjoy your stay!"} irb> coll.class irb> => Mongo::Collection How can I use the...
Azoth asked 22/1, 2011 at 20:5
1

© 2022 - 2024 — McMap. All rights reserved.