AEM Solr Connector
CMS, Java

AEM Solr Connector

Apache Solr search is a open source search engine platform to enable web search. For search to work, a collection in Solr needs to be created and indexing needs to be setup. To accomplish this, there are many manual steps that are to be performed in Solr which can be error prone and need the knowledge of a different tool.

We, at TechAspect, have developed a connector which will connect AEM with Solr and and perform operations like Indexing,Boosting and Synonyms.

Goals and Objectives

  • Solr connector connects AEM with Solr through admin page from tools tab.
  • This connector can create cores directly from AEM page.
  • Using this connector, we can add multi number of page paths which are to be indexed to Solr core.
  • Using this connector, we can re-index all the pages.
  • If replication is done on a page index/de-index will be done automatically based on replication(Activate/Deactivate).
  • Using this connector, we can perform boosting (Index and Query).
  • Using this connector, we can delete a core completely.
  • Using this connector, we can add Synonyms as well.

How Solr Connector Works?

  • Go to AEM Author instance Home page.
  • Click on Tools -> Solr configuration .
  • This is the Solr Admin Dashboard.

        Collection/Index:

  1. To Create a new collection in the solr Instance, click on ‘Collection/Index’ which will redirect to admin page.
  2. Admin page will be open where you can see list of collections and their status and related operations as shown in the figure. Empty if no collection is created from connector.  
  3. If no collection is selected, we will have create button which will redirect to collection creation page.
  4. On the Collection/Index page; Enter the collection name in the ‘Name for the Collection’ field and add Content & Asset paths that are to be indexed in the collection by clicking on ‘Add fields ‘button.
  5. If ‘Run Indexing’ check box is checked, content would be indexed as soon as the collection is created. If it is unchecked, Collection is created but Pages will not be indexed.

    Featured Results:

  1. Featured results are the results which are not indexed to solr but they are persisted in AEM.
  2. Featured results features at the top of search results just like ADS.

    Solr Synonyms:

  1. By default, solr provides synonyms features. Ex: If we configure synonym for color as colour and if we search with either of the words we will get result that contains both the words.
  2. This connector provides a feature where we can configure solr synonyms from AEM page. 
  3. We can add/update multiple synonyms.

    Index Boosting:

  1. Select the language/locale name from the list.
  2. Select ‘Asset’ or ‘Page’ option. 
  3. Click on ‘Get pages or Assets’ button; this would retrieve pages containing the selected tags.
  4. Add boost value appropriately for each page (pages with higher boost value would be displayed on top of the results).
  5. Click on ‘Update’ button to save the changes.

    Query Boosting:

  1. In the query boosting screen, select the language/locale from the list .
  2. Click on ‘Add field’ button .
  3. Select an index field from the Field dropdown to be boosted.
  4. Configure the boost value for the selected field.
  5. Select the ‘Enable query boosting’ checkbox and click on ‘Update’ button.

 

In our next blog, we will be discussing more about how Featured Results can be configured and managed.

About The Author

Leave a Reply

*