» Go: Building Full-Text Search API with ElasticSearch » 2. Index Documents » 2.2 Setup Elasticsearch
Setup Elasticsearch
Prepare Elasticsearch:
- Install Elasticsearch on your machine and start it.
- By default, Elasticsearch listens on port
9200
for HTTP requests. You can access it via http://localhost:9200/ in your web browser or use tools like curl or Postman to interact with it.- The Elasticsearch documentation is an excellent resource for learning about the API and its capabilities: Elasticsearch Reference.
Install elasticsearch dependency:
go get -u github.com/elastic/go-elasticsearch/v8
Loading...
> code result goes here