NGram with Elasticsearch

Setup a sandbox

Note: Even without the video, you can learn all the crucial details from the steps that are documented below

  1. Login to your cloud-box over ssh

  2. Create a directory for running an elasticsearch sandbox:

  3. Step into the working directory:

  4. Create a docker-compose.yml file to install and run elasticsearch:

  5. Create an entrypoint file named docker-entrypoint-es2-plugins.sh to install useful plugins:

  6. Make sure to change the permissions to execute sh files:

  7. Start the service: docker-compose up

Play Around

  1. Use the Any Request tab in /_plugin/head/ to create an index with a custom analyzer for a 3 by 3 ngram:

  2. Go to /_plugin/elasticsearch-inquisitor/#/analyzers to see the ngram_3_by_3 analyzer at the bottom of the page.

    • click the checkbox and then use the top most input field to see how the analyzer breaks down the input into tokens

Last updated