Elastic Search Index Feeder
Prerequisites
In order to use this module, you’ll need to make sure you have the following as well:
-
The Webhooks module which notifies you on
publish
andunpublish
events and it’s used to update the Elastic Search index.
Installing with Maven
Maven is the easiest way to install the module. Add the following to your bundle:
<dependency>
<groupId>info.magnolia.elasticsearch</groupId>
<artifactId>elastic-search-index-feeder</artifactId>
<version>1.0</version>
</dependency>
Usage
Elasticsearch Index Creation and Treatment
One Index per Workspace
useOneIndexPerWorkspace: true
If this setting was chosen, the indexName
settings is suffixed with the workspace
-name using this naming scheme: indexName + "_" + workspace
.
To apply that for the example above, mgnl_elastic_website
would be created in Elasticsearch.
useOneIndexPerWorkspace: false
If this setting was chosen, the indexName
settings is used untouched.
Wildcard approach
Using the wildcard configuration approach, every content published in the specified workspace will be pushed to elasticsearch.
Try to make sure you define properties that every content has in common. |
Selective approach
The selective approach allows you to filter out specific data from your content to push into elasticsearch.
contentSelectionAttribute: "mgnl:template"
contentAttributesToPush:
"mtk2:pages/basic": (1)
- title
- description
1 | Here, only pages of the website workspace based on the "mtk2:pages/basic" -template will be considered for elasticsearch feeding: |