21 handy elasticsearch queries

Elasticsearch is a powerful, fast and surprisingly user freindly data store and search tool. It’s not quite a database and it’s not quite a search engine, elasticsearch sits somewhere comfortably in between.

For these examples, we’ll store some domain names, Ip addresses and related information as that is a lot more fun than traditional bookstore type demos and example apps.

 

First, we’ll create the index:

┬áThat will create a basic index with a single shard called “domaindb”

Now that we’ve got a basic index with some data, let’s try a first query. We’ll search for “google” within every field in the entire index.

 

 

 

Comments