Skip to content
Advertisement

Tag: elasticsearch

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 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

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

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

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

Advertisement