navigation_title | mapped_pages |
---|---|
Search Applications |
Search Applications enable users to build search-powered applications that leverage the full power of {{es}} and its Query DSL, with a simplified user experience. Create search applications based on your {{es}} indices, build queries using search templates, and easily preview your results directly in the {{kib}} Search UI.
You can also interact with your search applications using the Search Application APIs. Search Applications are designed to simplify building unified search experiences across a range of enterprise search use cases, using the Elastic platform.
::::{admonition} Search Applications documentation Documentation for the Search Applications feature lives in two places:
- The documentation in this section covers the basics of Search Applications, information about working with Search Applications in the {{kib}} UI, and use case examples.
- The {{es}} API documentation contains the API references for working with Search Applications programmatically. Jump there if you’re only interested in the APIs.
::::
The Search Applications feature was introduced in Elastic version 8.8.0.
::::{note} Search Applications is a beta feature. Beta features are subject to change and are not covered by the support SLA of general release (GA) features. Elastic plans to promote this feature to GA in a future release.
::::
This feature is available to all Elastic Cloud deployments.
This feature is also available to self-managed deployments when Elastic subscription requirements are satisfied. View the requirements for this feature under the Elastic Search section of the Elastic Stack subscriptions page.
Your deployment must include the {{es}} and {{kib}} services.
Managing search applications requires the manage_search_application
cluster privilege, and also requires the manage
index privilege on all indices associated with the search application.
The {{es}} Query DSL is powerful and flexible, but it comes with a steep learning curve. Complex queries are verbose and hard to understand for non-experts. We’ve designed search applications to be easier to search over, but with the flexibility of working with an {{es}} index.
Search Applications use search templates to simplify the process of building queries. Templates are defined when creating a search application, and can be customized according to your needs. Read Search API and templates for the details.
You can create build, and manage your search applications directly in the {{kib}} UI under Search. Make sure you have at least one {{es}} index to work with on your deployment. The indices underlying your search application are searched together, similar to how an alias searches over multiple indices.
To create a new search application in {{kib}}:
- Go to Search > Search Applications.
- Select Create.
- Select the {{es}} indices you want to use for your search application.
- Name your search application.
- Select Create.
Your search application should now be available in the list.
Once created, you can explore the documents in your search application under Search > Search Applications > your-search-application > Docs Explorer. From there, you can expand a matching {{es}} document to see its full contents.
Use the {{es}} Put Search Application API to create a search application.
The following example creates a search application named my_search_application
that searches over the my_search_index1
and my_search_index2
indices, along with defining a simple search template (Refer to Default template example).
PUT /_application/search_application/my_search_application
{
"indices": [ "my_search_index1", "my_search_index2" ],
"template": {
"script": {
"source": {
"query": {
"query_string": {
"query": "{{query_string}}",
"default_field": "{{default_field}}"
}
}
},
"params": {
"query_string": "*",
"default_field": "*"
}
}
}
}
Search templates are the heart of your search applications. The default template created for a search application is very minimal, and you’ll want to customize it to suit your needs. Search API and templates contains a number of examples to get you started, including the default template, as well as templates for text search, semantic search and hybrid search.