This is the Magnolia Algolia search indexing module. It allows you to feed magnolia managed content into an Algolia index. The module is fully event driven. Therefore incremental updates are sent to the index on events like publication or depublication.
If this command needs to run asynchronously, the command above must be adapted to run its Jcr-Stuff via MgnlContext.doInSystemContext().
5
Customize Your applicationID as shown in the url after your login to Algolia.
6
Customize Your Algolia apiKey. Get this value from Algolia. We recommend that you use a custom API key rather than the default Admin API Key to perform the indexing process.
7
Customize The name of the Magnolia workspace, which contains the data to be fed.
8
Here we specify the events when our command gets called.
9
Customize The index-name in Algolia. This will be automatically created if absent.
10
Customize If true, the indexName settings is suffixed with the workspace-name using this naming scheme: indexName + "_" + workspace.
Example
To apply that for the example above, example.com-company_website would be created in Algolia.
If you choose false, the indexName settings remains untouched, but the workspace name is used to prefix entries in Algolia to prevent name clashes.
Algolia is using a special property objectID to identify index items.
This is populated with the JCR node path (and prefixed with the workspace when useOneIndexPerWorkspace was set to `false`) to provide a better readability when it comes down to debugging the data.
Using this configuration approach, all content published in the specified workspace is pushed to algolia.
Try to make sure you define properties which every content has in common. If the content lacks a specified property, it is omitted in the payload of the push.
Here you can filter out the specific data you wish to push into algolia. With the example configuration below, only pages of the website workspace based on the template "mtk2:pages/basic"-template will be considered for algolia feeding:
Please keep in mind that records can’t go beyond a certain size limit in Algolia. This limit might depend on your plan. See the Algolia pricing page for more details. If you try to index a record that exceeds the limit, Algolia returns the Record is too big error.
See also here for more details on limitations.
The Algolia Search Index feeder module utilizes the algoliasearch-core 3.16.5 library.
According to the limits of your actual plan, you can limit the size of rich text-properties in Magnolia with a maxlength setting.