MongoDB and OAK integration

Avatar

Avatar
Validate 1
Level 1
anthonyt2853861
Level 1

Like

1 like

Total Posts

9 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
anthonyt2853861
Level 1

Like

1 like

Total Posts

9 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
anthonyt2853861
Level 1

20-05-2020

The question is:

 

I plan to create a MongoDB database which will store information that is obtained from an external API. I need to integrate this MongoDB database with my AEM project in such a way that I can generate OAK indexes that will be obtained from that database, this in order to create a search in my AEM project. I have reviewed the following documentation:

 

https://docs.adobe.com/content/help/en/experience-manager-65/deploying/deploying/queries-and-indexin...

https://docs.adobe.com/content/help/en/experience-manager-65/deploying/practices/best-practices-for-...

https://jackrabbit.apache.org/oak/docs/query/query.html

 

I understand that OAK indexes the content stored in my project's repository. Is there a way to store external content in the repository? If this option is possible it could save me having to integrate from MongoDB.

Screenshot from 2020-05-20 13-27-35.png

 

I look forward to your comments, thank you.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Give Back 5
Employee
sunjot16
Employee

Likes

106 likes

Total Posts

164 posts

Correct reply

50 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 25
Give Back 10
Give Back
View profile

Avatar
Give Back 5
Employee
sunjot16
Employee

Likes

106 likes

Total Posts

164 posts

Correct reply

50 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 25
Give Back 10
Give Back
View profile
sunjot16
Employee

20-05-2020

You can make use of Document Node Store(which is the basis for AEM's MongoMK implementation).

https://docs.adobe.com/content/help/en/experience-manager-65/deploying/deploying/data-store-config.h...

 

The deployment guide stating how to deploy AEM with MongoDB:

https://docs.adobe.com/content/help/en/experience-manager-64/deploying/introduction/aem-with-mongodb...

 

 

Hope these help !!

Answers (2)

Answers (2)

Avatar

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,134 likes

Total Posts

3,166 posts

Correct reply

1,079 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,134 likes

Total Posts

3,166 posts

Correct reply

1,079 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile
Jörg_Hoh
Employee

21-05-2020

If I understand you correctly, you want some application approaching directly the MongoDB and that this content then shows up in AEM/Oak and is reachable through its API.

 

This is not possible, because Oak does not know of the documents you added outside of its control to the MongoDB. Therefor it will never show up in the indexes. If you want to content to be indexed within Oak, you need to insert into the repository by regular means (Oak/Sling APIs).

 

HTH,

Jörg

Avatar

Avatar
Give Back 50
Employee
berliant
Employee

Likes

207 likes

Total Posts

315 posts

Correct reply

98 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile

Avatar
Give Back 50
Employee
berliant
Employee

Likes

207 likes

Total Posts

315 posts

Correct reply

98 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile
berliant
Employee

20-05-2020

Does it mean that you've installed AEM on TarMK and you want to use a MongoMK to store project's data?

What is the use case of such a complex deployment? 

To make it happened you need to implement a MongoDB connector like to an external DB. I don't think we have any sample, but you can get an idea from https://docs.adobe.com/content/help/en/experience-manager-65/developing/platform/jdbc.html

In that case, you would have to define Mongo indexes and Mongo queries.

Note that you can have either MongoMK or TarMK, but not a mix.

MongoMK is recommended with over 100 concurrent user's connections to an AEM. If you don't have such a high load, you can easily employ a TarMK.