Questions tagged [elasticsearch-jest]

Jest is a HTTP REST client for Java's Elasticsearch. Use with [elasticsearch] and/or [java]

161 questions
2
votes
1 answer

How to cast Jest SearchResult hits to domain object

I am using Jest to query Elasticsearch and so far it has been great. Jest's documentation says: Result can be cast to List of domain object; ... and shows this example: SearchResult result = client.execute(search); List
or9ob
  • 2,313
  • 4
  • 25
  • 45
2
votes
1 answer

Bucket script java api in elasticsearch

I made elasticsearch query that get each oid name and it's count divided by 1000. ( the number(1000) can be changed) "aggregations" : { "agg_oid" : { "terms" : { "field" : "oid", "order" : { …
J.Done
  • 2,783
  • 9
  • 31
  • 58
2
votes
0 answers

Using Jest with HTTPS and SSL

I am using Jest version 0.1.6 to handle the requests to and from an AWS Elastic Search cluster (ver 1.5). It seems that Jest defaults to HTTP, however I see in the latest versions of Jest you can enable HTTPS through: JestClientFactory factory = new…
kennyh31
  • 21
  • 2
2
votes
1 answer

Elasticsearch return nested objects without their parents

I have an index that looks like this: { "mappings":{ "authors":{ "properties":{ "books":{ "type":"nested", "properties":{ …
alexgbelov
  • 3,032
  • 4
  • 28
  • 42
2
votes
1 answer

Using Jest or Java API is there a way to tell Elasticsearch to create documents from json as a String?

Given this POJO: public class People { String sex; long age; String names; } The "names" property will be a json string for which I need to create nested documents for. Here is an example of an instance I need to save to Elasticsearch using…
wxkevin
  • 1,634
  • 2
  • 25
  • 44
2
votes
1 answer

updating index settings through elasticsearch java client

I am using Jest client libraries to connect and interface with my ES cluster. I was able to injest documents to an index sucessfully and specify settings. Settings.Builder settings = Settings.settingsBuilder(); settings.put("number_of_shards",…
enwafor
  • 101
  • 1
  • 8
2
votes
2 answers

Jest mapping with getSourceAsObjectList()

I tried to map elastic data to list. since getSourceAsObjectList() method is deprecated, I made code like this. class activityObj { private String name; private String oid; public String getName() { return name; } …
J.Done
  • 2,783
  • 9
  • 31
  • 58
2
votes
1 answer

Elasticsearch partial update not happening while using updateBuilder

I have the following document in elastic search: { "postDate": "2016-03-09T11:57:37+0530", "message": "trying out Elasticsearch", "user": "ankita", "tags": [ "testing" ] } And i am trying to update it…
Ankita Bhowmik
  • 463
  • 1
  • 5
  • 20
2
votes
1 answer

How can I make Jest handle an ElasticSearch server being unavailable?

I currently configure Jest by giving it a list of server URIs. Like this: public JestClient jestClient() { final JestClientFactory factory = new JestClientFactory(); factory.setHttpClientConfig(new HttpClientConfig …
leros
  • 485
  • 6
  • 16
2
votes
0 answers

ElasticSearch Jest client use: MalformedJsonException on any queries

I am trying to use a JEST Client to search the remotely located ElasticSearch index. However I've ran into a problem - every single query, be it constructed using various builders or just default ES queries, everything returns…
Shajirr
  • 164
  • 3
  • 14
2
votes
1 answer

Calling CreateIndex with settings without using ImmutableSettings

In the Jest readme there is an example of creating index with settings but it uses the ImmutableSettings class from ElasticSearch library. Unfortunately due to some conflicts, we can't include ElasticSearch library in our project. Is there a way to…
user1452215
  • 620
  • 5
  • 16
2
votes
1 answer

Inserting an Element with a _parent field

I'm using ElasticSearch for an application in order to store and search for data. Because it's also important to search for relationships in my particular case, I recently changed the structure of my data and I am using the _parent field now.…
Alexandra
  • 500
  • 8
  • 20
2
votes
1 answer

Is it possible to use HTTP Basic Auth to connect to Nginx proxied Elasticsearch with Jest?

I am sending requests to Elasticsearch over HTTP from a Java client using Jest. Since my requests must traverse the public Internet, I am using an Nginx proxy in front of Elasticsearch to provide SSL and HTTP Basic Auth. However, I don't see a way…
ljcundiff
  • 1,159
  • 1
  • 9
  • 14
1
vote
2 answers

Add alias to index and remove index using JEST API in Java

I'm using jest api for connect to elastic Search I'm wonder if there is a way in Jest to add alias to index with existing index name and delete the index in same operation. like this, but via Jest api: POST /_aliases { "actions" : [ {…
TwTw
  • 551
  • 4
  • 15
1
vote
1 answer

ElasticSearch: Adding kerberos authentication using Jest Client

We have to implement kerberos authentication using Jest client in our application. Maven dependency: io.searchbox jest ${jest.version}