0
votes
2answers
15 views

how to store multi-dimensional array in mongoDB

I asked a question here.Simply speaking, my algorithm need a four dimension array. and the size could reach 32G. so I plan to store it in MongoDB. I have implemented it in my way. As I never use ...
0
votes
1answer
21 views

MongoDB Java Driver Infinite loop while reading results

I am reading MongoDB results using the following code , however the while loop runs in an infinite loop always iterating over the first element in the collection, can someone point out what I am doing ...
0
votes
1answer
31 views

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"}]} Here's the code I am working with so far: ...
1
vote
2answers
46 views

Unable to delete object using datastore, query (with `id`) on dao and ds return zero result

I'm trying to delete an object from datastore but it's not deleting it. Code is given below: MoIADocument moIADoc = new MoIADocument(); // update fields in moIADoc object ds.save(moIADoc); ...
1
vote
1answer
31 views

mongodb: java: How to update a field in MongoDB using expression with existing value

I need to update a field using some expression. Given a DBObject query, how can I multiply or divide given field by an argument value? How can I write a function performing operation something like ...
0
votes
1answer
49 views

Increase performance on MongoDB query

I have a 4GB mongodb database holding ip to geo data. The data looks like this: { "_id" : ObjectId("51d1c15d3a673a1a57f20251"), "IP_FROM" : NumberLong(1168612352), "IP_TO" : NumberLong(1168612607), ...
0
votes
2answers
26 views

CSV to GeoJSON conversion

I want to convert a CSV line into a GeoJSON object. I am using CSVReader. Hence, nextLine[] has all the separated tokens. I want to create BasicDBObject which has various attributes stored. I am doing ...
0
votes
1answer
121 views

Play Framework for Java 2.1 and MongoDB

I'm about to build a project in Play Framework for Java 2.1 and I would like to use MongoDB to store data. I've installed both Play 2.1 and MongoDB 2.4.4. Is it possible to build a Play! project ...
0
votes
2answers
38 views

installing MongoDB java driver

I'm really new in Java and also MongoDB world. I would like to use MongoDB and Java. I have downloaded MongoDB driver for java. It is a jar file, my question is how can I use this Jar file. I've used ...
0
votes
2answers
78 views

mongodb Queries: How to get nested Data on a Spark/Freemarker page?

This may be a bit more complicated than it needs to be, but I am using: mongoDB Spark Freemarker java I cannot figure out how to access embedded data in mongodb to print on the website. I want to ...
1
vote
2answers
51 views

When does MongoDB Java Driver makes connection?

I am using latest Java Driver (2.11.1) for MongoDB. MongoDB Java API essentially is One instance of MongoClient class (with internal connection pool) getDB() for getting DB object getCollection() ...
0
votes
2answers
75 views

Connect to remote mongodb server with java

I'm trying to connect to a remote mongodb instance, but it keeps throwing an error. Java code: Mongo mongo = new Mongo("172.234.52.24"); DB db = mongo.getDB("myDB"); collection = ...
0
votes
2answers
88 views

mongoDB selecting record based on two conditions

A sample record in my database looks like : { "_id" : 2, "name" : "Corliss Zuk", "scores" : [ { "type" : "exam", "score" : ...
1
vote
2answers
103 views

How can I do mapping from AggregationOutput to a POJO?

For a complicated query I descended to MongoDB Java API (using Spring-data for most of my stuff) and I wrote a aggregate statement using BasicDBObjects. DBCollection users = ...
0
votes
1answer
275 views

Can't find MongoClient in Java Drivers

In reading all the documentation on the mongo site for using the Java Driver, it makes references to using MongoClient() to make a connection. It talks about how they formerly used Mongo() but it has ...

1 2 3 4 5
15 30 50 per page