3. The Appbase Dashboard and ElasticSearch Query-Builder

Head over to https://dashboard.appbase.io and click “Browser” to see your data. If you were already browsing your app’s data, you might need to refresh.

Types , in ElasticSearch, can be thought of as SQL tables (except you handle relationships with alternative queries).

, in ElasticSearch, can be thought of as SQL tables (except you handle relationships with alternative queries). Documents can be thought of like rows in a table.

can be thought of like rows in a table. Document IDs are essentially primary keys and must be unique.

If you click on “Builder” you’ll enter a query-builder where you can create custom queries for your data. Click on “Select types to apply query”, you can select your post type. On the right side, you'll see the query needed to return all the documents associated with that type. Run it.

You should see some JSON containing all your documents. Notice the “hits” array.

Open another tab to browse your data for a string. In my case, the lipsum word eos is in a post title.

In the query builder, I can click “+ Query”, then “Field”, “title”, set “query” to match , and "Input" to eos .

Run your query. You should get something like this (assuming any matches were found):

This “score” thing is really crucial for any kind of modern search functionality. It will intelligently/fuzzily guess what someone is looking for instead of outright telling them, “No, we don’t have any of that!”

Imagine you’re a customer trying to look up “quick-dry paint” but you misspell it to “quik-dry paint”. quik returns nothing, so other paint matches appear first. Now you have to flip through several pages to find what you're looking for... But if you're using a powerful tool like ElasticSearch, quik is tested against quick and users will find exactly what they're looking for.

Many, many, industry leaders use ElasticSearch for a lot, if not all, of their search functionality, but its query language is capable of much more.

We’ll explore ElasticSearch’s query language to do some really cool stuff in future tutorials, but for now let’s just get comfy with Appbase.