SearchBlox AEM Package

SearchBlox AEM Package

SearchBlox AEM Package avoids re-indexing an entire collection when modifications are made to its documents. SearchBlox allows the AEM collection to be in real-time sync with ongoing site pages updates like changing the content, creating a new site page, deleting or unpublishing the existing site page. SearchBlox AEM Package will also integrate search with AEM site pages. To integrate the SearchBlox AEM package, we need to deploy the package to configure the SearchBlox properties.

Deploy SearchBlox AEM Package and Verify Installation

  1. Download the SearchBlox AEM Package
  2. Click Hammer Icon → Deployment → Packages
  1. Click on Upload Package and select 'Force Upload' as shown in the reference below:
  1. Select it and then install it once the SearchBlox AEM package upload is complete.

Once you successfully install the SearchBlox AEM custom package, you can check the Activity log for installed nodes status as shown in the reference below:

Configure AEM Collection with SearchBlox AEM Package

  1. Navigate to Config Manager → http://localhost:4502/system/console/configMgr
  2. Search for SearchBlox Configuration in the browser.
  1. Click SearchBlox Configuration
  1. Configure the properties listed below,

    • SearchBlox Url → SearchBlox Instance Url for index documents
    • Collection Name → AEM Collection for index documents
    • API Key → SearchBlox API key
    • Private Key → SB-PKey for secure communication
  2. Once the Configuration is complete, click on the Save button to save the SearchBlox Configuration.

Configure Search Integration with SearchBlox AEM Package

  1. Navigate to Config Manager → http://localhost:4502/system/console/configMgr
  2. Search for SearchBlox Search Configuration in the browser.
  3. Configure your Search URL by editing 'SearchBlox Search Configuration'

Provide your Domain search URL without a slash at the end as shown in the reference below:

  1. Once the Configuration is complete, click on the Save button to save the SearchBlox Configuration.
  2. Publish the SearchBlox AEM Search Page.

Now, you can access the SearchBlox AEM search page using the link: https://<Author or Publisher Domain>/content/searchblox/search.html

📘

Note:

  1. Please ensure your search page domain is configured with the allowed CORS configuration.
  2. Please make sure to configure 'PluginDomain' in your Custom search UI Folder > facet.js file.
  3. Please ensure to access the below URLs in your browser if you see an API Failed error with Search Page access.

https://<DNS>:8443/rest/v2/api/secured/enabled
https://<DNS>:8443/ui/v1/search/settings

  1. You can further customize the search and update the Search Integration code with AEM site pages. For example, with the SearchBlox AEM site page, we can edit/update Search widget code using Visual Editor or Developer Mode.

Customize Search Template using SearchBlox Embed Search Code:
i. Navigate to AEM home page (http://localhost:4502/aem/start.html)
ii. Click Sites and Select SearchBlox AEM -> Search then click edit.

  • Visual Editor Update:

Note: In the HTML code body section, below script tags should be there:

<script data-sly-use.info="com.searchblox.aem.core.SearchBloxSearchConfiguration" src="${info.getPluginUrl}/facet.js"></script>
<script data-sly-use.info="com.searchblox.aem.core.SearchBloxSearchConfiguration" src="${info.getPluginUrl}/build.js"></script>

iii. Save your Embed Search Code and Republish the Search Page.

Uninstall SearchBlox AEM Package

Uninstallation can only be possible if the package installation has not been done correctly or if you want to update the existing SearchBlox AEM package.

  1. Navigate to packages, Click Hammer Icon → Deployment → Packages
  1. Select searchblox-aem.ui apps package → More → Uninstall
  1. Once the SearchBlox AEM Package uninstallation is complete, click on More and select Delete Option.

Once the SearchBlox AEM Package installation and collection setup are done, the collection gets added with a new document whenever a new site page is published.

In the same way, whenever a site page gets unpublished or deleted from the content repository, the SearchBlox AEM Package will remove the document from the SearchBlox AEM collection.

SearchBlox AEM Package will also update meta content or site page content with SearchBlox AEM Collection.

Logging
You can find SearchBlox AEM Package status log under Author 'deployedlogs' folder with the name 'searchblox-aem-status.log.'

👍

Note:

You should follow the following order to remove the SearchBlox AEM Package

  • Uninstall Package
  • Delete the Package

SearchBlox AEM Package will still run on the Author Instance if the package is deleted before the Uninstallation.


Did this page help you?