Setting up open source OpenSearch - Amazon Personalize
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Setting up open source OpenSearch

After you complete the Amazon Personalize workflow and meet the requirements listed in Guidelines and requirements, you're ready to set up open source and install the Amazon Personalize Search Ranking plugin.

If you already have an OpenSearch cluster running, you can manually install the plugin. If you don't have a cluster running, you can install OpenSearch and the plugin from scratch with a bash script.

Manually installing the plugin on an existing OpenSearch cluster

If you already have an OpenSearch cluster, you can manually install the plugin on your cluster directly from the OpenSearch GitHub repository.

To manually install the plugin
  1. Use the following command to start your OpenSearch cluster:

    bin/opensearch
  2. If you haven't already, upload your catalog data to your OpenSearch cluster. When you upload your data, you create an OpenSearch index and define your field mappings. Then you upload your data to that index. For an example, see Create an index and field mappings using sample data.

  3. Use the following command to install the plugin:

    bin/opensearch-plugin install https://github.com/opensearch-project/search-processor/releases/download/2.9.0/opensearch-search-processor-2.9.0.0.zip

    For more information about installing plugins, see Installing plugins.

After you install the Amazon Personalize Search Ranking plugin, you're ready to configure it. You configure the plugin by creating a search pipeline and specifying a personalized_search_ranking response processor. For more information, see Configuring the plugin.

Setting up your cluster and installing the plugin with a quickstart script

If you haven't created an OpenSearch cluster, you can use a quickstart bash script to create one. This script sets up an OpenSearch cluster in a Docker container, sets up credentials using your default Amazon profile, and installs the Amazon Personalize Search Ranking plugin.

For information about manually creating an OpenSearch cluster, see the Quickstart instructions in the OpenSearch documentation.

To install the plugin with a quickstart bash script
  1. Before you run the script, download and install Docker Desktop for your operating system.

  2. Download the quick start bash script from GitHub.

  3. In your working directory, run the script with the following command.

    sh personalized_search_ranking_quickstart.sh

    With this command, the script uses the credentials in your default Amazon profile. To provide an alternate profile, use the --profile argument.

    sh personalized_search_ranking_quickstart.sh --profile profile-name

    After you run the script, you can find more information about the script in the README file that's located in the unique directory created by the script. This directory stores the Dockerfile and docker-compose.yml files that the script uses. For example: ../opensearch-personalize-intelligent-ranking-docker.1234/README.

  4. Upload your catalog data to your OpenSearch cluster. When you upload your data, you create an OpenSearch index and define your field mappings. Then you upload your data to that index. For an example, see Create an index and field mappings using sample data.

After you set up OpenSearch and install the Amazon Personalize Search Ranking plugin, you're ready to configure it. You configure the plugin by creating a search pipeline and specifying a personalized_search_ranking response processor. For more information, see Configuring the plugin.