Skip to content

kevcodez/Elasticsearch-Java-Transportclient-Showcase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Elasticsearch Java API

This repository contains code showing how to use the Elasticsearch API for Java.

Setup

Download Elasticsearch from the official website https://www.elastic.co/de/downloads/elasticsearch

Unzip the folder and navigate into bin.

Execute the elasticsearch.bat / elasticsearch.sh.

Run the de.kevcodez.elasticsearch.create.FillIndex class that generates a few thousand of orders and puts them into Elasticsearch.

You may now run de.kevcodez.elasticsearch.search.Aggregations or de.kevcodez.elasticsearch.search.BasicSearch.

Create ElasticSearch Index

You need to create an index named orders.

curl -X PUT localhost:9200/orders

Edit Host/Port

The de.kevcodez.elasticsearch.Client creates an Elasticsearch client with the default Port 9300 and host localhost.

Lombok

This project uses Lombok, see http://projectlombok.org for reference.

Further reading

Java API Overview: https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/index.html

About

Sample code for Elasticsearch Java API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages