Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

AEM Integration with Algolia Search Using Java API


Community Advisor


Company Name: Rightpoint

Company URL:

Your Name: Nikhil Kumar

Your Title: AEM Lead

As we have already seen so many integration with search servers like Solr and Elastic. Now we have something new as part of enhancing search capability in AEM.
Algolia is really easy to manage and it's really simple to set it up. It provides different API for the connection to the Algolia server.

Below are the list of some API that Algolia supports:

Lets start with creating our own Algolia account. It provides a 17 days trial period. So yeah this the enough time to explore all it's features and integrations.

Creating Account:
1. Create you trial account on
2. After logging in you can create you own index here and start indexing the data using that index name. I have take dev_initial as my index name.


I am going to use the JAVA Api provided by Algolia.
To use this API we need to add the following dependencies in POM.xml

<!-- Algolia library with Apache HTTP requester (compatible with Java 8 and above) -->

<!-- Algolia library with JDK 11 native HTTP client (compatible with Java 11 and above) -->

<!-- Algolia library with Apache HTTP requester bundled as a single uber JAR (compatible with Java 8 and above) -->

After updating the POM.xml file we need to run the mvn compile command to download the dependencies.
Now we have all the dependencies available to integrate AEM with Algolia.

I have used a test servlet to index some random data.

You should have ApplicationID and Admin API Key to connect in AEM , which you can get it on your Algolia account
Which will be used in below code snippet:

SearchClient client = 
DefaultSearchClient.create("YourApplicationID", "YourAdminAPIKey");






class Contact {

  private String firstname;
  private String lastname;
  private int followers;
  private String company;
  private String objectID;

  // Getters/setters ommitted

Note: Before deploying the code deploy the algoliasearch-apache-uber.jar (3.10.0) on the AEM felix console from

After indexing the data we can see the data is stored at Algolia server for search implementation. It's really easy to manage using the dashboard availability and easy to manage the data on the Algolia server.



In case of any query you can post your queries on and get it resolved. Algolia Team gets back to you very quickly.


@Jagpreet_Singh_ @kautuk_sahni @Veena_Vikram 



Aspire Experience Manager Journey Optimizer