6. ElasticSearch
Version Tools
esvm - Elasticsearch Version Manager is a command line application used for development to manage different versions of Elasticsearch. Like nvm
is for NodeJS, similarly esvm
is for ElasticSearch.
Useful plugins
Curated
ES Head - simplest admin console for ES.
ES Inquisitor helps you understand:
how ES breaks down your text into tokens for storage, and
your search into tokens for lookups.
Access it at:
<proto>//<host>:<port>/_plugin/inquisitor/#/analyzers
Sense - An extension for the Chrome Browser. Very useful, you can find it in the chrome web store.
Hear-Say
ES GUI - An angularJS client for elasticsearch as a plugin.
Sensitive - A native version of the
sense
plugin for elasticsearchReclineJS - for building good UI on top of
CouchDB
.Approx - to do approximate or exact distinct counts, and fast term lists
Elastic Facets - A set of facets and related tools for ElasticSearch.
Elastic Hammer -
Sense
would suffice in our opinion. The only additional merit we see, is that it renders images inline, when presenting search results.
TODO for Authors:
Need to create a docker-compose file with an entrypoint script that installs this plugin for readers to play around with the most appropriate version of ES. Plugins usually can't keep up with the lightning fast progress of ES.
Useful tips
Analyzers
It is possible to define new analyzers for an index. But it is required to close the index first and open it after the changes are made.
Gram-based approach:
http://exploringelasticsearch.com/searching_usernames_and_tokenish_text.html#ch-strangetext
ngrams don’t attempt language heuristics such as stemming that don’t apply to strings like “cmdrtaco”. They also handle mis-spelled terms well, since a search just needs to have a plurality of matches of sub-parts of a given term
ngrams allow developers to trade storage for CPU
Autocomplete and various ways to get there:
Use term suggester - ask for closest match of a search term from the terms you have already indexed. It won't complete your text, but produce similar lookalikes from the terms present in ES.
Rebuilding an index
Scan / Scroll
https://github.com/karussell/elasticsearch-reindex
cloned it
ran build:
mvn -DskipTests clean package
uploaded the zip from "target” directory to hosted ES
reindex operation errored out during trial & error
You can avoid rebuilding an index due to mapping changes by using aliases or multi-fields mappings.
Examples & Exercises
TODO for Authors:
Need to create a docker-compose file to setup and play with analyzers quickly.
TODO for Authors:
Use sense
chrome plugin or CURL to demonstrate.
Last updated