Elastic Search Applications

edit

Elastic Search Applications

edit

Search Applications enable users to build search-powered applications that leverage the full power of Elasticsearch and its Query DSL, with a simplified user experience. Create search applications based on your Elasticsearch indices, build queries using search templates, and easily preview your results directly in the Enterprise Search Kibana UI.

You can also interact with your search applications using the Elasticsearch 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.

Availability and prerequisites

edit

The Search Applications feature was introduced in Elastic version 8.8.0.

Search Applications is a tech preview feature. Tech preview features are subject to change and are not covered by the support SLA of generally available (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 the subscription requirements are satisfied. View the requirements for this feature under the Elastic Enterprise Search section of the Elastic Stack subscriptions page.

Your deployment must include the Elasticsearch and Kibana services.

Managing search applications requires the manage_search_application cluster privilege, and also requires manage privileges on all indices associated with the search application.

App Search and Workplace Search remain as-is, and are still available as separate, standalone experiences, independent of Search Applications.

Overview

edit

The Elasticsearch 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 Elasticsearch 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 applications templates for the details.

Get started

edit

Option 1: Get started in the UI

edit

You can create build, and manage your search applications directly in the Kibana UI under Enterprise Search. Make sure you have at least one Elasticsearch 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 Kibana:

  1. Go to Enterprise Search > Search Applications.
  2. Select Create.
  3. Select the Elasticsearch indices you want to use for your search application.
  4. Name your search application.
  5. Select Create.

Your search application should now be available in the list of search applications.

Overview screen with list of search applications

Once created, you can preview searches against your search application under Enterprise Search > Search Applications > your-search-application > Search Preview. From there, you can expand a matching Elasticsearch document to see its full contents.

Preview screen with search results

Option 2: Get started with the API

edit

Use the Elasticsearch 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

edit

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 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.