elasticsearchHow do I quickly get started with Elasticsearch?
-
Download and install the latest version of Elasticsearch on your local machine.
-
Start up the Elasticsearch server by running the following command:
bin/elasticsearch
-
To verify that the server is running correctly, send an HTTP request using curl:
curl -X GET "localhost:9200"
-
The response should look similar to the following:
{
"name" : "node-1",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "abc123",
"version" : {
"number" : "7.6.2",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "abc123",
"build_date" : "2020-03-26T06:34:37.794943Z",
"build_snapshot" : false,
"lucene_version" : "8.4.0",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
- You can now start indexing data in Elasticsearch. For example, here is a command to index a document:
{
"name": "John Doe"
}
'
- You can also query the indexed data. Here is an example query:
- For more information on how to use Elasticsearch, see the official documentation.
More of Elasticsearch
- How can I use elasticsearch zone awareness to improve my software development?
- How do I use Elasticsearch with ZGC?
- How do I use ElasticSearch to zip files?
- How do I configure elasticsearch xpack.security.transport.ssl?
- How can I use Elasticsearch and ZFS together?
- How can I use the cat indices API in Elasticsearch?
- How can I use Elasticsearch and Zookeeper together to manage distributed applications?
- How do I use the Elasticsearch UI?
- How can I use Elasticsearch and Zabbix together for software development?
- How do I set up an Elasticsearch Yum repository?
See more codes...