top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Can't find libmongoc.a for MongoDB?

+2 votes
149 views

When I compiled mongo c driver 1.3.1 exactly as following steps, I cant find static mongoc library(like libmongoc.a).

$ tar xzf mongo-c-driver-$ver.tar.gz $ cd mongo-c-driver-$ver $ ./configure $ make $ sudo make install

Thanks in advance.

posted Feb 1, 2016 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+2 votes

I get duplicates of fields and subfield using aggregation. Searching for duplicated sub field "k01.v" works fine:

db.table_0.aggregate({"$group" : { _id: "$k01.v", "count": { "$sum": 1 } } }
{"$match": {"count" : {"$gt": 1} } }
{"$project": {"k01.v" : "$_id", "_id" : 0} });

Unfortunately, this doesnt work when searching for sub field "a1.0" (field "a1" is an array):

db.table_0.aggregate({"$group" : { _id: "$a1.0", "count": { "$sum": 1 } } }
{"$match": {"count" : {"$gt": 1} } }
{"$project": {"a1.0" : "$_id", "_id" : 0} });

Any workaround ?

+1 vote

Im just doing CRUD on a mongo database with Java. My problem is when I query the database

db.getCollection("something").find()

I get the documents correctly, but the ObjectId of each document is something like this:

"_id": {
  "timestamp": **********,
  "machineIdentifier": 16375804,
  "processIdentifier": 3908,
  "counter": 9920756,
  "time": 1459641911000,
  "date": "2016-04-03T00:05:11.000+0000",
  "timeSecond": **********
}

I need to get the 12-byte ObjectId, like this:

ObjectId("507f1f77bcf86cd799439011")

How do I do that?

+2 votes

I have an use case where I have find all the matching records and apply the aggregation like count, sum, group by etc .
Can I use such scenarios where I have to use find and aggregate function together or should I find then get the cursor object and have to perform aggregation operation separately

+2 votes

I have created some of the indexes in mongoDB, Now i want to see the indexes created in the DB.

...