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.
- To Create a new collection in the solr Instance, click on ‘Collection/Index’ which will redirect to admin page.
- 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.
- If no collection is selected, we will have create button which will redirect to collection creation page.
- 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.
- 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 are the results which are not indexed to solr but they are persisted in AEM.
- Featured results features at the top of search results just like ADS.
- 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.
- This connector provides a feature where we can configure solr synonyms from AEM page.
- We can add/update multiple synonyms.
- Select the language/locale name from the list.
- Select ‘Asset’ or ‘Page’ option.
- Click on ‘Get pages or Assets’ button; this would retrieve pages containing the selected tags.
- Add boost value appropriately for each page (pages with higher boost value would be displayed on top of the results).
- Click on ‘Update’ button to save the changes.
- In the query boosting screen, select the language/locale from the list .
- Click on ‘Add field’ button .
- Select an index field from the Field dropdown to be boosted.
- Configure the boost value for the selected field.
- 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.