How can I query AEM Data from MongoDB | Community
Skip to main content
Level 2
Oct 16, 2015 2:28 AM UTC

How can I query AEM Data from MongoDB

I have configured AEM with MongoDB. I wanted to Query MongoDB to fetch AEM data. 

Say I wanted to know list of products for Geometrix Website. OR Say I wanted to know all the users available inside AEM.

Is there any documentation available where I can find out - how to query AEM data from MongoDB, how it is stored and all? 

I wanted to know this because, suppose I wanted to write a Java code to insert data inside MongoDB, for adding some data or displaying some data from AEM. 

Note: I am using MongodbVUE GUI tool to access DB data. 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

7 replies

kautuk_sahni
Employee
Oct 6, 2016 11:14 AM UTC

Hi 

Please refer to this forums post:- 

Link:- http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.topic.html/forum__alig-i_have_configuredae.html

//

    You can view all data that used to be under repository folder and know is in your mongo database.

    You can use wide range of tools to connect to your database. My choice is RoboMongo :)

   

Also please have a look this this community article:- http://cq-ops.tumblr.com/post/87307885504/useful-mongodb-commands-for-aem-6

// Useful MongoDB Commands for AEM 6

Documentation :- https://docs.adobe.com/docs/en/aem/6-2/deploy/platform/aem-with-mongodb.html

~kautuk

Translate
Kautuk Sahni
Peter_Puzanovs
New Participant
Oct 16, 2015 2:28 AM UTC

Yeah you can view all data that used to be under repository folder and know is in your mongo database.

You can use wide range of tools to connect to your database. My choice is RoboMongo :)

However, you should not need to do that since, your access layer ideally is Sling/OAK rather then Mongo and direct search. Depends on your use case ofc.

Translate
Level 2
Oct 16, 2015 2:28 AM UTC

RoboMongo is same as MongodbVUE right? But my question is, how can I query? Can you give some sample query or link where it is explained?...

Translate
Peter_Puzanovs
New Participant
Oct 16, 2015 2:28 AM UTC

Yes it's similar.

Can't see is being that straight forward, you can start by searching individual fields, added an example that searches for all product under nodes.

Remind you, that some of these fields might be named differently in your database(r14cf0d10fdd-0-1) is likely to have a different name.

Say I wanted to know list of products for Geometrix Website:

db.getCollection('nodes').find({ "cq:template.r14cf0d10fdd-0-1" : /geometrixx-outdoors\/templates\/page_product/})

P.S. it's much easier to execute the same search in AEM6 directly.

Translate