Free and Open Source, Distributed, RESTful Search Engine
= Elasticsearch
Elasticsearch is a distributed search and analytics engine, scalable data store and vector database optimized for speed and relevance on production-scale workloads. Elasticsearch is the foundation of Elastic's open Stack platform. Search in near real-time over massive datasets, perform vector searches, integrate with generative AI applications, and much more.
Use cases enabled by Elasticsearch include:
... and more!
To learn more about Elasticsearch's features and capabilities, see our https://www.elastic.co/products/elasticsearch[product page].
To access information on https://www.elastic.co/search-labs/blog/categories/ml-research[machine learning innovations] and the latest https://www.elastic.co/search-labs/blog/categories/lucene[Lucene contributions from Elastic], more information can be found in https://www.elastic.co/search-labs[Search Labs].
[[get-started]] == Get started
The simplest way to set up Elasticsearch is to create a managed deployment with https://www.elastic.co/cloud/as-a-service[Elasticsearch Service on Elastic Cloud].
If you prefer to install and manage Elasticsearch yourself, you can download the latest version from https://www.elastic.co/downloads/elasticsearch[elastic.co/downloads/elasticsearch].
=== Run Elasticsearch locally
////
IMPORTANT: This content is replicated in the Elasticsearch repo. See run-elasticsearch-locally.asciidoc.
Ensure both files are in sync.
https://github.com/elastic/start-local is the source of truth. ////
DO NOT USE THESE INSTRUCTIONS FOR PRODUCTION DEPLOYMENTS.
Quickly set up Elasticsearch and Kibana in Docker for local development or testing, using the https://github.com/elastic/start-local?tab=readme-ov-file#-try-elasticsearch-and-kibana-locally[`start-local` script].
ℹ️ For more detailed information about the start-local setup, refer to the https://github.com/elastic/start-local[README on GitHub].
==== Prerequisites
==== Trial license This setup comes with a one-month trial license that includes all Elastic features.
After the trial period, the license reverts to Free and open - Basic. Refer to https://www.elastic.co/subscriptions[Elastic subscriptions] for more information.
==== Run start-local
To set up Elasticsearch and Kibana locally, run the start-local script:
// NOTCONSOLE
This script creates an elastic-start-local folder containing configuration files and starts both Elasticsearch and Kibana using Docker.
After running the script, you can access Elastic services at the following endpoints:
The script generates a random password for the elastic user, which is displayed at the end of the installation and stored in the .env file.
localhost.==== API access
An API key for Elasticsearch is generated and stored in the .env file as ES_LOCAL_API_KEY.
Use this key to connect to Elasticsearch with a https://www.elastic.co/guide/en/elasticsearch/client/index.html[programming language client] or the https://www.elastic.co/guide/en/elasticsearch/reference/current/rest-apis.html[REST API].
From the elastic-start-local folder, check the connection to Elasticsearch using curl:
To use the password for the elastic user, set and export the ES_LOCAL_PASSWORD environment variable. For example:
// NOTCONSOLE
=== Send requests to Elasticsearch
You send data and other requests to Elasticsearch through REST APIs. You can interact with Elasticsearch using any client that sends HTTP requests, such as the https://www.elastic.co/guide/en/elasticsearch/client/index.html[Elasticsearch language clients] and https://curl.se[curl].
==== Using curl
Here's an example curl command to create a new Elasticsearch index, using basic auth:
// NOTCONSOLE
==== Using a language client
To connect to your local dev Elasticsearch cluster with a language client, you can use basic authentication with the elastic username and the password stored in the ES_LOCAL_PASSWORD environment variable.
You'll use the following connection details:
http://localhost:9200elastic$ES_LOCAL_PASSWORD (Value you set in the environment variable)For example, to connect with the Python elasticsearch client:
import os from elasticsearch import Elasticsearch
username = 'elastic' password = os.getenv('ES_LOCAL_PASSWORD') # Value you set in the environment variable
client = Elasticsearch( "http://localhost:9200", basic_auth=(username, password) )
==== Using the Dev Tools Console
Kibana's developer console provides an easy way to experiment and test requests. To access the console, open Kibana,
[CI] MultiClusterSpecApproximationTsIT test {csv-spec:approximation-ts.Exact stats by group and time bucket} failing
https://github.com/elastic/elasticsearch/issues/168894
Labels: >test-failure, Team:Analytics, :Analytics/ES|QL, low-risk
[CI] MixedClusterEsqlOldCoordinatorSpecApproximationTsIT test {csv-spec:approximation-ts.Exact stats by group and time bucket} failing
https://github.com/elastic/elasticsearch/issues/168892
Labels: >test-failure, Team:Analytics, :Analytics/ES|QL, low-risk
[CI] ParquetPreWarmReleaseTests testConcurrentReadsAgainstSmallCap failing
https://github.com/elastic/elasticsearch/issues/168889
Labels: >test-failure, Team:Analytics, :Analytics/ES|QL, medium-risk
[CI] ClassificationIT testStopAndRestart failing
https://github.com/elastic/elasticsearch/issues/168883
Labels: >test-failure, :ml, Team:ML, needs:risk
Elasticsearch is a free and open project and we love to receive contributions from our community — you! There are many ways to contribute, from writing tutorials or blog posts, improving the documentation, submitting bug reports and feature requests or writing code which can be incorporated into Elasticsearch itself.
If you want to be rewarded for your contributions, sign up for the Elastic Contributor Program. Each time you make a valid contribution, you’ll earn points that increase your chances of winning prizes and being recognized as a top contributor.
If you think you have found a bug in Elasticsearch, first make sure that you are testing against the latest version of Elasticsearch - your issue may already have been fixed. If not, search our issues list on GitHub in case a similar issue has already been opened.
It is very helpful if you can prepare a reproduction of the bug. In other words, provide a small test case which we can run to confirm your bug. It makes it easier to find the problem and to fix it. Test cases should be provided as curl commands which we can copy and paste into a terminal to run it locally, for example:
# delete the index
curl -XDELETE localhost:9200/test
# insert a document
curl -XPUT localhost:9200/test/test/1 -d '{
"title": "test document"
}'
# this should return XXXX but instead returns YYY
curl ....
Provide as much information as you can. You may think that the problem lies with your query, when actually it depends on how your data is indexed. The easier it is for us to recreate your problem, the faster it is likely to be fixed.
If you find yourself wishing for a feature that doesn't exist in Elasticsearch, you are probably not alone. There are bound to be others out there with similar needs. Many of the features that Elasticsearch has today have been added because our users saw the need. Open an issue on our issues list on GitHub which describes the feature you would like to see, why you need it, and how it should work.
If you would like to contribute a new feature or a bug fix to Elasticsearch, please discuss your idea first on the GitHub issue. If there is no GitHub issue for your idea, please open one. It may be that somebody is already working on it, or that there are particular complexities that you should know about before starting the implementation. There are often a number of ways to fix a problem and it is important to find the right approach before spending time on a PR that cannot be merged.
We add the help wanted label to existing GitHub issues for which community
contributions are particularly welcome, and we use the good first issue label
to mark issues that we think will be suitable for new contributors.
We generally do not assign issues to contributors outside of Elastic, but please check the discussion on the issue to see if anyone else is working on the same topic. If there are other active contributors in the same area then it is a good idea to reach out to them so you can work together on the issue. If there hasn't been any discussion for a while then go ahead and start working on the issue yourself.
The process for contributing to any of the Elastic repositories is similar. Details for individual projects can be found below.
You will need to fork the main Elasticsearch code or documentation repository and clone it to your local machine. See GitHub help page for help.
Further instructions for specific projects are given below.
Following these tips prior to raising a pull request will speed up the review cycle.
Once your changes and tests are ready to submit for review:
Test your changes
Run the test suite to make sure that nothing is broken. See the TESTING file for help running tests.
Sign the Contributor License Agreement
Please make sure you have signed our Contributor License Agreement. We are not asking you to assign copyright to us, but to give us the right to distribute your code without restriction. We ask this of all contributors in order to assure our users of the origin and continuing existence of the code. You only need to sign the CLA once.
Rebase your changes
Update your local repository with the most recent code from the main Elasticsearch repository, and rebase your branch on top of the latest main branch. We prefer your initial changes to be squashed into a single commit. Later, if we ask you to make changes, add them as separate commits. This makes them easier to review. As a final step before merging we will either ask you to squash all commits yourself or we'll do it for you.
Submit a pull request
Push your local changes to your forked copy of the repository and [submit a pull request](https://help.github.com/articles/using