Questions tagged [elasticsearch-jest]

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

161 questions
24
votes
4 answers

Java HTTP Client for ElasticSearch

I'm trying to connect from Java to ElasticSearch but I can only connect over HTTP. I can't use the TransportClient. Is there a Java client wrapper around the ElasticSearch REST APIs? If so, how do I use it?
James Ward
  • 29,283
  • 9
  • 49
  • 85
22
votes
3 answers

OR and AND Operators in Elasticsearch query

I have few json document with the following format :- _source: { userId: "A1A1", customerId: "C1", component: "comp_1", timestamp: 1408986553, } I want to query the document based on the…
Udit Bhatia
  • 525
  • 1
  • 5
  • 14
16
votes
2 answers

How to fix the URI does not specify a valid host name in ClientProtocolException:

When I execute the elastic search java API using jest client, I face the following error org.apache.http.client.ClientProtocolException: URI does not specify a valid host name:localhost:9200/index/type/_search I tries various possibilities to fix…
mohan
  • 359
  • 1
  • 5
  • 18
14
votes
2 answers

Signing AWS HTTP requests with Apache HttpComponents Client

I'm trying to make HTTP requests to an AWS Elasticsearch domain protected by an IAM access policy. I need to sign these requests for them to be authorized by AWS. I'm using Jest, which in turn use Apache HttpComponents Client. This seems to be a…
10
votes
1 answer

AWS ElasticSearch Service version 2.3 does not work with Jest Client: java.net.SocketTimeoutException

Some time ago Amazon Web Services added possibility to choose version of ElasticSearch service 1.5 or 2.3. I have been using older version and Jest client worked perfectly fine with AWS and with ElasticSearch in memory (unit tests). When I changed…
ruhungry
  • 4,506
  • 20
  • 54
  • 98
9
votes
1 answer

How to get type names of elastic search index in internal java api or jest api

I have a index with the name of demo and it contains different types. I'm using elastic search java internal api and rest api jest both of them in my app. Basicly I want to make this request curl -XGET 'http:localhost:9200/demo/_mapping' Is there…
Haktan Aydın
  • 581
  • 1
  • 6
  • 21
7
votes
1 answer

JestClient is throwing SocketTimeoutException after being idle for sometime

I'm using JEST to connect to elasticsearch in a spring-boot application. When the application is idle (doesn't send any requests to elasticsearch) for some time, then the JestClient is throwing SocketTImeoutException. I'm creating the client using a…
pkgajulapalli
  • 1,066
  • 3
  • 20
  • 44
6
votes
0 answers

ElasticSearch Jest Client Read Timeout

My config in jest 2.4 ES 2.4 JestClientFactory factory = new JestClientFactory(); factory.setHttpClientConfig(new HttpClientConfig .Builder("serverX:9200") .multiThreaded(true) .defaultMaxTotalConnectionPerRoute(75) …
Rodrigo Asensio
  • 2,760
  • 4
  • 26
  • 26
6
votes
1 answer

How to add mapping in ElasticSearch using JEST

I m trying to create an index in ES with specific analyzer and mapping, using JEST. I m using the following code: CreateIndex createIndex = new CreateIndex.Builder(indexName) .settings( ImmutableSettings.builder() …
panipsilos
  • 2,219
  • 11
  • 37
  • 53
6
votes
1 answer

Switching between the nodes in ElasticSearch using JEST client

I have 3 Nodes in my ElasticSearch Cluster. eg. 10.10.0.1, 10.10.0.2, 10.10.0.3 Now I am trying to connect to the Cluster using Jest Client API and giving the IP (10.10.0.1) of one of the above nodes. Now if the Node (10.10.0.1) is down, so does…
6
votes
3 answers

How to get a List of Indices from ElasticSearch using Jest

I'm trying to retrieve a list of indices using Jest, but I just got as far as: Stats statistics = new Stats.Builder().build(); result = client.execute(statistics); How can i retrieve the list of indices from the result? Do I have to use something…
Chris
  • 1,092
  • 2
  • 19
  • 39
5
votes
1 answer

Clojure accessing static inner class builder expecting var but mapped to class error on build

In Clojure I want to interop to use: JestClientFactory factory = new JestClientFactory(); factory.setHttpClientConfig(new HttpClientConfig .Builder("http://localhost:9200") .build()); So I wrote some code…
perkss
  • 1,037
  • 1
  • 11
  • 37
5
votes
1 answer

Elasticsearch - get source field data with java api

I'm using elastic search with jest (as java client). I need some fields that is in nested document and since cannot get nested fields as pair, I need '_source' to get them. Here is previous question to get them in ES query[ Link ], and It works…
J.Done
  • 2,783
  • 9
  • 31
  • 58
5
votes
1 answer

Elasticsearch Jest update a whole document

I have an elasticsearch server which i'm accessing via a java server using the Jest client and i was looking for the best way to update multiple fields of a document each time. I have looked to the documentation so far, and i have found that there…
Master Mind
  • 3,014
  • 4
  • 32
  • 63
5
votes
1 answer

Completion suggester builder for Jest

Is there a built in solution in jest for sending completion suggester requests to elasticsearch? Do I need to implement my own io.searchbox.AbstractAction for that?
bosskovic
  • 2,034
  • 1
  • 14
  • 29
1
2 3
10 11