Skip to main content

Define and Use a Search Template in Elasticsearch

Hands-On Lab


Photo of Myles Young

Myles Young

BigData Training Architect II in Content





The search API in Elasticsearch is a very powerful tool to extract just what you're looking for from vast amounts of data. However, if you were to use Elasticsearch as a backend search engine for an application or a website, you can't expect your users to know how to craft search queries in Elasticsearch. Search templates allow a developer to create a complex search and abstract all the search terms into parameters. Then, all the developer has to do is request the parameters from the user and execute the templated search query with the user-provided values. In this hands-on lab, you will exercise the following: Create a search template and abstract various search terms Execute a search using a saved search template

What are Hands-On Labs?

Hands-On Labs are scenario-based learning environments where learners can practice without consequences. Don't compromise a system or waste money on expensive downloads. Practice real-world skills without the real-world risk, no assembly required.