Skip to content

Project to accompany an article for the java magazine showing some example code for interacting with elasticsearch.

License

Notifications You must be signed in to change notification settings

luminis-ams/java-magazine-elasticsearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repository accompanies an article I have written for Java Magazine. It shows some basic usage of interacting with elasticsearch from a standard Java Application. You can so a query combined with a filter and ask for some aggregations.

The repos contains a reader for the java magazines from the nljug website. It scrapes the content and puts it into an elasticsearch index.

# Building the sample
The project makes use of maven to build an executable jar.

# Running the sample
There are two classes that you can run:
JavaMagazineReader: Imports all articles into a new index.
JavaMagazineRunner: Starts a very basic command line client that connects to your cluster.

If you want to change the name of the cluster, change the Constants class.

# Running the unit/integration tests
Use maven to run the unit / integration tests.

# Docker
We have provided you with a docker-compose configuration file. Using this file you can start-up two docker containers. One for Elasticsearch and one for Kibana.

If you have docker-compose installed you can change to the docker directory and just run:

$ docker-compose up

About

Project to accompany an article for the java magazine showing some example code for interacting with elasticsearch.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages