elasticsearch-java-api

How to talk to aws elasticsearch service using elastic java client?

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-29 07:07:37
问题 I have set up a elasticsearch server using AWS elasticsearch service (Not EC2). It gave me an endpoint https://xxx-xxxxxxxx.us-west-2.es.amazonaws.com/ and if I click this endpoint(Note that there is no port specified) I can get the expected { status: 200, name: "Mastermind", cluster_name: "xxxx", version: { number: "1.5.2", build_hash: "yyyyyy", build_timestamp: "2015-04-27T09:21:06Z", build_snapshot: false, lucene_version: "4.10.4" }, tagline: "You Know, for Search" } The question is how do

Update By Query in Elasticsearch using Java

喜你入骨 提交于 2019-11-28 11:18:32
I’m currently using Elasticsearch V2.3.1. I want to use the following Elasticsearch query in Java. POST /twitter/_update_by_query { "script": { "inline": "ctx._source.List = [‘Item 1’,’Item 2’]” }, "query": { "term": { "user": "kimchy" } } } The above query searches for “user” named “kimchy” and updates the “List” field with given values. This query updates multiple documents at the same time. I read about the Update API for Java here https://www.elastic.co/guide/en/elasticsearch/client/java-api/2.3/java-docs-update.html but couldn’t find what I was looking for. The Update API for Java only