Wednesday, December 21, 2016

Elasticsearch analogies

I work a lot with Elasticsearch.

At my job we have migrated from using SQL Server to Elasticsearch for log storage.

Sometimes, when you're learning new grammar for a new technology you're working on it's nice to have metaphors or similes to use when learning the component parts.

One of the best similies I've heard of for what Elasticsearch represents is that it's like an index at the end of a book. Additionally, Elasticsearch by many, even those who work at Elastic, consider it not a DB.

If you start using Elasticsearch a lot more you'll begin to work with types, templates and mappings.

A type could be analogous to a regular SQL table.

Mappings could be similar to a a table column that stores a field a certain way that could be something like a string, int, varchar.

How mappings and settings are created and loaded has changed from Elasticsearch 1.x to 2.x+. Now that we use Elasticsearch 2.x we have to load template files that are used when new indices are created. They combine settings and the mappings for the fields that get parsed out and placed into an index.

Thanks to this website for giving me those Aha! analogies.

No comments: