Top "Mongodb-java" questions

MongoDB is a scalable, high-performance, open source, document-oriented database.

Mongo DB query in java

I have to write a complex mongo query using java but am not able to do it. The mongo query …

mongodb mongodb-java mongodb-query
How to upsert document in MongoDB Java driver 3

what is the idiomatic way to upsert a document using version 3 of the mongodb java driver (specifically v3.0.1)? We have …

java mongodb scala mongodb-java casbah
resolving java result 137

I am running a java process on amazon ec2. It ran for 72 mins and then suddenly I get "java result 137". …

java mongodb amazon-ec2 mongodb-java
Creating a mongodb query in Java with $or and $in

I am trying to write a java code using mongodb api to create this mongodb query: { "$or": [{"prd" : {"$in" : ["1234", "0987"]}} , {"rsin" : "3228742"}]} …

java mongodb mongodb-query query-builder mongodb-java
Spring Data MongoDb for class inheritance

I want to store different data to one collection in MongoDb and have Spring data beans with appropriate field.. Sorry, …

java mongodb spring-data mongodb-java
Index already exists with different options error while using createIndex() in latest MongoDB java driver

So I am upgrading the MongoDB java driver to 2.12.4 where the ensureIndex() method has been deprecated. I am instead using …

java mongodb indexing mongodb-java
Closing MongoDB Java Connection

I am trying to design a Mongo Db connection class where I am maintaning MongoClient as static. private static MongoClient …

java mongodb mongodb-query mongodb-java
Difference between cursor.count() and cursor.size() in MongoDB

What is the difference between the cursor.count() and cursor.size() methods of MongoDB's DBCursor?

java mongodb mongodb-java mongo-java
How to update value of specific embedded document, inside an array, of a specific document in MongoDB?

I have the following structure in my document: { _id : ObjectId("43jh4j343j4j"), array : [ { _arrayId : ObjectId("dsd87dsa9d87…

java mongodb mongodb-java
MongoDB: WriteResult.getN() always returns 0?

According to the javaDoc, getN() method of WriteResult class in MongoDB-java returns the number of documents updated in the opertion. …

mongodb mongodb-java