find « mongodb « Java Database Q&A





1. what's the difference of db.mydb.find({tag:'java'}).count() and db.mydb.count({tag:'java'}) in mongodb    stackoverflow.com

I'm need to count a lot of documents (30 M) with a criteria fast in mondodb what's the difference of db.mydb.find({tag:'java'}).count() and db.mydb.count({tag:'java'}) it's one faster than the other? I have and index on ...

2. Mongodb Java - How to return restricted fields with find() or findOne()    stackoverflow.com

With the driver Java Mongodb, I am looking for a way to return just restricted fields with a find() or findOne(). For example, I have a collection "people" with fields : "id", ...

3. How to Find the matched record in mongodb?    stackoverflow.com

I have a record in my collection and I want to fetch the details of the person whose id is 1. But I am getting the details for 2times instead of ...

4. Finding geo spatial with morphia mongodb using Java    stackoverflow.com

I would like to query some geo location points with morphia framework. I use my latitude, longitude, and radius(100 km.) with "Near" method to query the other around my location and ...

5. MongoDB range search on numbers doesn't work as expected    stackoverflow.com

I am trying to do a range search on some numbers in MongoDB. I have the following two records. The import fields are the last two, value and type. I want to ...

6. Find some values in a mongodb collection?    stackoverflow.com

Im trying to read a (mongo)userdatabase with java. On the tutorial page I saw how to read the whole collection. I can do something like that:

    DBCursor cursor ...