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 have to specify the endpoint upon initializing JestClient? My application design uses Singleton classes for these initializations so I’m not sure how to fix this aside from using a different Elasticsearch
Tag: elasticsearch
How can I generate Query in elastic search for multiple boolean queries
I want to generate query for multiple boolean operation dynamically in elasticsearch with spring framework. my data in elasticsearch is like I want to execute query for this boolean operation ((n=xyz) && (s=abc)) Answer To be able to query Array inner object you should map your processedData as a Nested type, arrays of objects do not work as you would
Spring data elasticsearch query on multiple indices
I have multiple indices for every day in elasticsearch and I am using ElasticsearchRepository to query my documents. Documents definition: My index will create dynamically for every day with this definition My Repository definition: When I query by client no just returning current day values. Test failed. Current day values returned not searched all indices. Probably Spring data searching a
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 need to do is get the query strings and use them so search information in elasticsearch. In python, the DSL can be a parameter like this: How
Kibana has strict security requirements enabled that your current browser does not meet
I want to write automatic test which tests if there are logs in the kibana UI and I have a problem with sending a http request using java to kibana. From the browser everything is working fine but when I send HTTP request from Jsoup library (the same happens also with curl) the kibana shows me the following: It looks
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 things: I was wondering can the same information be obtained using the Elasticsearch Java High-Level REST Client or the Transport Client in an older
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 inside _source. If I put @Id on one and @Field(name = “id”) on the other as shown in the example above, I get an
Spring Data Elasticsearch (4.x) – Using @Id forces id field in _source
Summary Recently we upgraded to Spring Data Elasticsearch 4.x. Part of this major release meant that Jackson is no longer used to convert our domain objects to json (using MappingElasticsearchConverter instead) [1]. This means we are now forced to add a new id field to all our documents. Previously we had domain objects like this: Which resulted in documents like