Initializing JestClient when application calls multiple Elasticsearch endpoints

My API currently calls one Elasticsearch endpoint using JestClient. I want to add some functionality that requires calling a second, different Elasticsearch endpoint. How is this possible, when you …

Solr synonym.txt adding at elasticsearch

I have already a working synonym.txt in solr. Now I want to add that same txt file at elasticseach. What can I do for it. At solr it was easy, I just keep that file in system. At elsticsearch I added …

How to use ElasticSearch JSON DSL in Java?

I’m working on a springboot project and having some trouble with ElasticSearch. The user will put some JSON-format elasticsearch DSL query strings in the database and they are black-box to me. What I …

Find total amount of disk space used by a Elasticsearch cluster

I am looking for a way to get the total amount of disk space used by a Elasticsearch cluster. I have found suggestions to use the following REST API endpoints to obtain this information among other …

ElasticSearch Search for Field Values does not return

Lets say I have document in the Elastic Search which does containt field “provider” in the _source. I have tryied many queries but none of them seem to return the document with searched …

Spring Data Elasticsearch mapping id named field inside _source

I’m trying to map documents from ElasticSearch into java objects using Spring Data Elastic (4.0.2). My problem is the following: I have two id fields one is the _id for the document itself, and one id …

Unhandled IOException when instantiating ResponseException for test

Trying to create a unit test for an elastic search exception handler that uses ResponseException but having trouble setting up the object. Mocking doesn’t work as ResponseException is a final class. …

Bulk upload CSV file into Elasticsearch using JavaAPI

I want to bulk upload the csv file into Elasticsearch using JAVA API (without using logstash). Elasticsearch version – 6.6 I have tried the below program using Jackson format to get source Map for …

Multiple Elasticsearch connections in a program

I was working on a service in which I get a searchHit from elastic cluster A and then use a field obtained from A to fetch details from elastic cluster B. I have created a class ClientFactory, which …

Run ES docker image with custom port using testcontainers

I want to run a container tests that running ES image via Docker. After some research I found https://www.testcontainers.org/ and they also have a built-it ES module. Because my development …