Questions tagged [mongodb-java]

MongoDB is a scalable, high-performance, open source, document-oriented database. This tag is used for questions related to the Java language bindings and drivers for MongoDB.

Java Language Center

Java Driver

Basics

Specific Topics and How-To

Reference

1045 questions
-1
votes
1 answer

How configure mongodb for support 1100 threads?

How can i configure mongodb's pool connection for support 1100 threads per seconds? I tried some configurations like bellow without sucess. connectionsPerHost = 200 threadsAllowedToBlockForConnectionMultiplier = 5 Can someone help me? Thanks.
Bernardo Maia
  • 99
  • 1
  • 6
-1
votes
1 answer

$all type of operator for subdocuments in mongodb

Mongo Document {"objects": { 1 : { Type: "A"}, { 2 : { Type: "B"}, { 3 : { Type: "C"}, { 4 : { Type: "A"} } Desired result: { 1 : { Type : "A"}, 4 : { Type : "A"} } How do i query the above Mongo Document to get the…
Raj
  • 95
  • 6
-1
votes
1 answer

how to find document with mongoDB using mongodb java in sub array of document?

This is really hard. I want to find the select nodes.index where radio.mac_address="00:06:5A:03:2E:5B". how can I get this query in MongoDB using java? My mongodb is as following. I tried so many queries. one of them is as following BasicDBObject…
Hitesh Vaghani
  • 1,342
  • 12
  • 31
-1
votes
1 answer

Truncate a Mongo DB Collection from Java

Is there a single method from MongoDB Java driver which deletes all documents in a collection ? so far I've only been able to do this by browsing a cursor and calling delete on each Document. Thanks
user2824073
  • 2,407
  • 10
  • 39
  • 73
-1
votes
1 answer

Call stored mongodb function from java

Suppose that you have java based server, and you are calling function which is stored in mongo db: Let say function name is test and impelemntaton is function(arg1, arg2){ return arg1; } DB db; .... How to correctly pass the arguments? I've…
-1
votes
3 answers

How can I backup a relational database into MongoDB?

I am using a NoSQL database (MongoDB), and I want to back up a relational database (SQL, MySQL) into a NoSQL database... I have read the manual inside & out - I read no reference on how to do so... How can that be done? Can you show an example?
user975828
  • 147
  • 1
  • 2
  • 10
-1
votes
1 answer

bar when save BasicDBObject

I am trying to save an object with lists however, when I save it the document appears with "\", like…
arthurfnsc
  • 915
  • 3
  • 13
  • 30
-2
votes
1 answer

MongoDB aggregation code using the Java driver

I am having a hard time in converting MongoDB aggregate query to Java. I am able to get result in the Mongo shell but not in Java ... db.intentAnalysisPojo.aggregate( {"$match": { "threadId": "f5683604-9fc8-40dd-9b7b-a1ef8e3bdb02"} }, {…
-2
votes
1 answer

Creating CRUD a Multi-section PDF Document using PDFBox (PDF Generation) and Maintaining in MongoDB

I am trying to create/maintain CRUD a PDF letter template using a PDFBox open source Java PDF Generation Library. The letter would have the following section has represented in my POJO class. private byte[] fileContent; private String…
Mega
  • 1,304
  • 5
  • 22
  • 37
-2
votes
1 answer

How do i append timestamp to a field in Mongo DB

I have a document with below fields inside a mongo collection. { _id: policyId_YYYYMMDDHH24MISS, createDate: ISO DATE, createId: VARCHAR } how can i append timestamp 'YYYYMMDDHH24MISS' to a field? Expected: { _id: CERT00501_20160210132745, …
sandy
  • 1
  • 1
  • 6
1 2 3
69
70