Get started with the Elasticsearch Vector Database project type

The Elasticsearch Vector Database project type on Elastic Cloud Serverless is built for AI-powered vector retrieval. Use this guide to create a project and learn about the different methods to ingest embeddings and run search queries.

To try a hands-on tutorial where you connect a client, index sample data, and run semantic, hybrid, and ES|QL searches, refer to Elasticsearch vector and full-text search in 10 minutes.

Note

Not sure whether this project type is right for you? Refer to When to use this project type.

If you're looking for an introduction to the Elastic Stack or the Elasticsearch product, refer to Elastic fundamentals or The Elasticsearch data store.

  1. Create an Elasticsearch Vector Database Serverless project

    There are two options to create serverless projects:

    • If you're a new user, sign up for a free 14-day trial. For more information about Elastic Cloud trials, refer to Trial information.
    • If you're an existing customer, log in to Elastic Cloud and do the following:
      1. Select Create project from the Serverless projects panel.
      2. Select Next from the Vector Database panel.
      3. Name your project.
      4. Select a cloud provider and region. For available regions, refer to Regions.
      5. Select Create project. It takes a few minutes to create your project.
      6. When the project is ready, select Continue to open it (you might need to log in to Elastic Cloud again).
    Note

    You need the admin predefined role or an equivalent custom role to create projects. For more information, refer to User roles and privileges.

    After you've created your project, note the Elasticsearch endpoint and API key from the project connection details. You'll use these to index data and run searches. New indices in this project type use vector index mode automatically.

  2. (Optional) Follow the in-product setup guides

    When you create a new Vector Database project, the Set up your Elasticsearch Vector Database page includes two guided paths you can follow. Each path walks you through ingest and then search examples, with sample scripts you can run in a client of your choosing or run the examples directly in the Dev Tools Console.

    The following setup guides are available in Kibana:

    Guide When to use What you do
    Generate embeddings from your content You want Elasticsearch to create embeddings for you Ingest content into a semantic_text field, then run a semantic or hybrid query
    Store your existing embeddings You already have vectors from your own model Index pre-generated embeddings into a dense_vector field, then run a semantic or hybrid query

    Alternatively, you can also use the Elasticsearch vector and full-text search in 10 minutes quickstart to connect a client, index sample data, and run semantic, hybrid, and ES|QL searches.

    You can also skip the setup guide and continue with the following steps.

  3. Ingest your data

    Use the approach that matches how you create embeddings.

  4. Search your data

    The search query type you can use depends on the vector field type you want to search. For an overview of field types and the queries you can use with each, refer to Vector field types and queries. You can also combine vector queries with filters on metadata fields in the same request.

After you've learned how to ingest embeddings and return relevant results, dig deeper into how vector search works, improve ranking for your use case, and tune project settings for latency and cost. Review the following: