Search

This add-on allows you to enable full-text search capabilities in your application with Elasticsearch.

Jmix uses Elasticsearch as a base for its search engine. In Jmix, if we need to search data, basically, entities, we need to build indexes for them. More information about search internals and indexing can be found in Elasticsearch documentation.

Installation

To include Search in your application, follow the instructions in the Add-ons section.

Connecting to Elasticsearch Service

Using Elasticsearch Cluster

To connect to the Elasticsearch service, you need to specify the following properties in the application.properties file:

  • jmix.search.elasticsearch.url - a full URL of the Elasticsearch cluster.

  • jmix.search.elasticsearch.login - a user login to connect to the Elasticsearch cluster.

  • jmix.search.elasticsearch.password - a user password to connect to the Elasticsearch cluster.

Using Amazon Web Services

To connect to Elasticsearch deployed in AWS with IAM authentication, add the following properties to your application.properties file:

  • jmix.search.elasticsearch.url - a full URL of Elasticsearch service.

  • jmix.search.elasticsearch.aws.region - AWS region, for example, 'eu-central-1'.

  • jmix.search.elasticsearch.aws.accessKey - an access key of the target IAM user.

  • jmix.search.elasticsearch.aws.secretKey - a secret key of the target IAM user.

Updating Index Data

Jmix application tracks data changes but does not pass them to Elasticsearch automatically. Please refer to section Indexing Queue Processing to set up the automatic update. You should do it to make data available for the search engine. Otherwise, your data will not appear in search results.