# Elasticsearch

**URL:** https://discuss.elastic.co/c/elastic-stack/elasticsearch/6.md?page=1665

[Latest](https://discuss.elastic.co/latest.md) · [Categories](https://discuss.elastic.co/categories.md) · [Tags](https://discuss.elastic.co/tags.md)

**Page:** 1666

---

## [Alert / Watcher email help to get hostname in email when triggered](https://discuss.elastic.co/t/alert-watcher-email-help-to-get-hostname-in-email-when-triggered/132886)

<div class="topic-metadata">

**Author:** [@phil.zac](https://discuss.elastic.co/u/phil.zac)\
**Replies:** 1\
**Last updated:** [June 5, 2018, 7:30am UTC](https://discuss.elastic.co/t/alert-watcher-email-help-to-get-hostname-in-email-when-triggered/132886 "2018-06-05T07:30:00Z")

</div>

Hi I am having trouble in getting hostname included in the email message. I have several hosts name that uses heartbeats. Suppose if one of them stops sending logs to the main server an email is triggered. I have setup…

---

## [How to transpose Xpack configuration from Java PreBuiltXPackTransportClient (old java client + Xpack) to RestHighLevelClient (new REST client + Xpack)?](https://discuss.elastic.co/t/how-to-transpose-xpack-configuration-from-java-prebuiltxpacktransportclient-old-java-client-xpack-to-resthighlevelclient-new-rest-client-xpack/134434)

<div class="topic-metadata">

**Author:** [@ivanqwam](https://discuss.elastic.co/u/ivanqwam)\
**Replies:** 2\
**Last updated:** [June 5, 2018, 7:29am UTC](https://discuss.elastic.co/t/how-to-transpose-xpack-configuration-from-java-prebuiltxpacktransportclient-old-java-client-xpack-to-resthighlevelclient-new-rest-client-xpack/134434 "2018-06-05T07:29:51Z")

</div>

How to set up Xpack for the Java RestHighLevelClient ? For the PreBuiltXPackTransportClient (old java client + Xpack), I did the following which runs just fine: ses.log(null, "DEBUG", "QESHost\_elast…

---

## [Curator delete snapshots](https://discuss.elastic.co/t/curator-delete-snapshots/134424)

<div class="topic-metadata">

**Author:** [@chuski92](https://discuss.elastic.co/u/chuski92)\
**Replies:** 4\
**Last updated:** [June 5, 2018, 6:42am UTC](https://discuss.elastic.co/t/curator-delete-snapshots/134424 "2018-06-05T06:42:01Z")

</div>

Hello. I have a doubt about deleting indices using curator. I'm deleting them with the simple curl command, and then deleting physically the files on my server because it doesn't delete it. My question is if deleting …

---

## [Search by digits doesn't work with edge\_ngram](https://discuss.elastic.co/t/search-by-digits-doesnt-work-with-edge-ngram/134433)

<div class="topic-metadata">

**Author:** [@mikhail.tin](https://discuss.elastic.co/u/mikhail.tin)\
**Replies:** 2\
**Last updated:** [June 5, 2018, 7:00am UTC](https://discuss.elastic.co/t/search-by-digits-doesnt-work-with-edge-ngram/134433 "2018-06-05T07:00:52Z")

</div>

Hi there, I am using a edge ngram tokenizer in order to provide partial matching . My scripts: PUT docs { "settings": { "analysis": { "analyzer": { "autocomplete": { "tokenizer": "autocom…

---

## [Transactions support in elasticsearch](https://discuss.elastic.co/t/transactions-support-in-elasticsearch/134537)

<div class="topic-metadata">

**Author:** [@prabhurajreddy](https://discuss.elastic.co/u/prabhurajreddy)\
**Replies:** 0\
**Last updated:** [June 5, 2018, 6:48am UTC](https://discuss.elastic.co/t/transactions-support-in-elasticsearch/134537 "2018-06-05T06:48:21Z")

</div>

As we know, elasticsearch doesn't support transactions, but Lucene supports transactional ACID properties. Is there a way to use Lucene transactions over elasticsearch ? if not possible, Is there any non standard way to…

---

## [Elasticsearch painless split](https://discuss.elastic.co/t/elasticsearch-painless-split/134515)

<div class="topic-metadata">

**Author:** [@hubiao](https://discuss.elastic.co/u/hubiao)\
**Replies:** 1\
**Last updated:** [June 5, 2018, 6:31am UTC](https://discuss.elastic.co/t/elasticsearch-painless-split/134515 "2018-06-05T06:31:14Z")

</div>

Environmental Science elasticsearch 5.5 JDK 1.8 windows 7 Why does split make a mistake? GET /data/\_search { "from": 0, "size": 6, "query": { "function\_score": { "query": …

---

## [Experiences with Elastic Upgrades from 1.X](https://discuss.elastic.co/t/experiences-with-elastic-upgrades-from-1-x/134523)

<div class="topic-metadata">

**Author:** [@Johnnycc1](https://discuss.elastic.co/u/Johnnycc1)\
**Replies:** 0\
**Last updated:** [June 5, 2018, 5:50am UTC](https://discuss.elastic.co/t/experiences-with-elastic-upgrades-from-1-x/134523 "2018-06-05T05:50:15Z")

</div>

Hey Guys, I have written up my experiences with upgrading a few elasticsearch clusters from V1.X to V6.X over at github. I've included a docker-compose with elastic 1.7.5 (with kibana + sense) & 6.2.4 (with kibana an…

---

## [Es Rolling Upgrade qustion from 5.5. to 5.6](https://discuss.elastic.co/t/es-rolling-upgrade-qustion-from-5-5-to-5-6/134519)

<div class="topic-metadata">

**Author:** [@lks21c](https://discuss.elastic.co/u/lks21c)\
**Replies:** 0\
**Last updated:** [June 5, 2018, 5:11am UTC](https://discuss.elastic.co/t/es-rolling-upgrade-qustion-from-5-5-to-5-6/134519 "2018-06-05T05:11:27Z")

</div>

Hi, guys. I maintain a ES cluster which has 16 nodes. (3 master, 11 data, 2 clients) My question is that which sequence do I need to do a rolling upgrade among 3 types of node. I'm supposed to upgrade data nodes firs…

---

## [Multiple cluster in same node , and also connected to other nodes](https://discuss.elastic.co/t/multiple-cluster-in-same-node-and-also-connected-to-other-nodes/134464)

<div class="topic-metadata">

**Author:** [@Prabhakaran\_N](https://discuss.elastic.co/u/Prabhakaran_N)\
**Replies:** 2\
**Last updated:** [June 5, 2018, 4:50am UTC](https://discuss.elastic.co/t/multiple-cluster-in-same-node-and-also-connected-to-other-nodes/134464 "2018-06-05T04:50:58Z")

</div>

how to create multiple cluster in single node .. and at the same how to connect with other nodes also ?? becoz, i need to search if both cluster went down in any node . Note : Actually am not saving anything in it .. …

---

## [Rsync data folder "nodes/0/indices" from broken node to working node](https://discuss.elastic.co/t/rsync-data-folder-nodes-0-indices-from-broken-node-to-working-node/134503)

<div class="topic-metadata">

**Author:** [@AndreCimander](https://discuss.elastic.co/u/AndreCimander)\
**Replies:** 1\
**Last updated:** [June 5, 2018, 3:22am UTC](https://discuss.elastic.co/t/rsync-data-folder-nodes-0-indices-from-broken-node-to-working-node/134503 "2018-06-05T03:22:35Z")

</div>

I couldn't find a recent answer for this (but my search skills after 16 hours of 5-to-6-upgrade-work are a little... downscaled). Long story short: I have to move 14 shards from a broken-beyond-repair node, which is boot…

---

## [Using x-pack in elasticsearch.py](https://discuss.elastic.co/t/using-x-pack-in-elasticsearch-py/134504)

<div class="topic-metadata">

**Author:** [@abolfazl\_dalily](https://discuss.elastic.co/u/abolfazl_dalily)\
**Replies:** 1\
**Last updated:** [June 5, 2018, 2:11am UTC](https://discuss.elastic.co/t/using-x-pack-in-elasticsearch-py/134504 "2018-06-05T02:11:36Z")

</div>

i run this Eleatic\\elasticsearch-6.2.4\\bin\\x-pack\>setup-passwords auto command and I got this response : Changed password for user kibana PASSWORD kibana = \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* Changed password for user logstash\_sys…

---

## [X-Pack get users using Java API](https://discuss.elastic.co/t/x-pack-get-users-using-java-api/134499)

<div class="topic-metadata">

**Author:** [@lengoyvaerts](https://discuss.elastic.co/u/lengoyvaerts)\
**Replies:** 1\
**Last updated:** [June 5, 2018, 2:06am UTC](https://discuss.elastic.co/t/x-pack-get-users-using-java-api/134499 "2018-06-05T02:06:59Z")

</div>

Hi, I'm trying to list all users using X-Pack Java API: GetUsersResponse response = xPackClient.security().prepareGetUsers().get(); return response.users(); All I get is a list of these Json objects: \[ { "runAs…

---

## [Cluster.routing.allocation.same\_shard.host: true not working as expected](https://discuss.elastic.co/t/cluster-routing-allocation-same-shard-host-true-not-working-as-expected/134496)

<div class="topic-metadata">

**Author:** [@Matias\_Antinanco](https://discuss.elastic.co/u/Matias_Antinanco)\
**Replies:** 0\
**Last updated:** [June 4, 2018, 10:19pm UTC](https://discuss.elastic.co/t/cluster-routing-allocation-same-shard-host-true-not-working-as-expected/134496 "2018-06-04T22:19:15Z")

</div>

Hi, I have a cluster with 29 physical servers running ElasticSearch 2.2.1. Three of the servers are dedicated master nodes and I am running 2 datanodes in each of the other servers (this is 52 datanodes in total). I am c…

---

## [Index logic documentation?](https://discuss.elastic.co/t/index-logic-documentation/134481)

<div class="topic-metadata">

**Author:** [@brandondash](https://discuss.elastic.co/u/brandondash)\
**Replies:** 11\
**Last updated:** [June 4, 2018, 10:16pm UTC](https://discuss.elastic.co/t/index-logic-documentation/134481 "2018-06-04T22:16:15Z")

</div>

I am looking for a writeup on when/how Elasticsearch decides to create new indices. I went to list all indexes on my single node ELK stack server expecting to find exactly two: the one being fed by Logstash and the one …

---

## [Multiple Aggregation API](https://discuss.elastic.co/t/multiple-aggregation-api/134495)

<div class="topic-metadata">

**Author:** [@Varun\_Somani](https://discuss.elastic.co/u/Varun_Somani)\
**Replies:** 0\
**Last updated:** [June 4, 2018, 10:08pm UTC](https://discuss.elastic.co/t/multiple-aggregation-api/134495 "2018-06-04T22:08:39Z")

</div>

I am trying to do multiple aggregations, for the same set of documents I want to get percentile for different fields. I can do multiple query programmatically but thought of asking if there is easier way.

---

## [How do you delete the task document once the task has completed?](https://discuss.elastic.co/t/how-do-you-delete-the-task-document-once-the-task-has-completed/134492)

<div class="topic-metadata">

**Author:** [@Jinggang\_Diao](https://discuss.elastic.co/u/Jinggang_Diao)\
**Replies:** 1\
**Last updated:** [June 4, 2018, 9:37pm UTC](https://discuss.elastic.co/t/how-do-you-delete-the-task-document-once-the-task-has-completed/134492 "2018-06-04T21:37:34Z")

</div>

This question is also asked here No delete task by id API in ES cluster? Intentionally? Not documented?, but no answer is provided.

---

## [Deleting Old Snapshots](https://discuss.elastic.co/t/deleting-old-snapshots/134085)

<div class="topic-metadata">

**Author:** [@MPurcell](https://discuss.elastic.co/u/MPurcell)\
**Replies:** 5\
**Last updated:** [June 4, 2018, 8:34pm UTC](https://discuss.elastic.co/t/deleting-old-snapshots/134085 "2018-06-04T20:34:18Z")

</div>

Periodically over the last year or two, I have taken snapshots of different indices. Some of these I have recorded in a spreadsheet, some I have not. Now, I would like to delete all snapshots older then 90 days that do n…

---

## [Purge Data base Elasticsearch](https://discuss.elastic.co/t/purge-data-base-elasticsearch/131738)

<div class="topic-metadata">

**Author:** [@asalma](https://discuss.elastic.co/u/asalma)\
**Replies:** 23\
**Last updated:** [June 4, 2018, 8:10pm UTC](https://discuss.elastic.co/t/purge-data-base-elasticsearch/131738 "2018-06-04T20:10:41Z")

</div>

Hi, Pleaaase, can someone tell me, how to purge the Elasticsearch database automatically every week ???

---

## [Fetch list of indices using PySpark](https://discuss.elastic.co/t/fetch-list-of-indices-using-pyspark/134483)

<div class="topic-metadata">

**Author:** [@vaidyanathan](https://discuss.elastic.co/u/vaidyanathan)\
**Replies:** 0\
**Last updated:** [June 4, 2018, 8:08pm UTC](https://discuss.elastic.co/t/fetch-list-of-indices-using-pyspark/134483 "2018-06-04T20:08:56Z")

</div>

Hi, Is there a way to fetch the list of Elastic Search indices using Pyspark. The idea is to have the full list of indices and save them to separate folders in Hdfs. Best Reagrds Vaidy

---

## [Extracting full-text from an attachment field](https://discuss.elastic.co/t/extracting-full-text-from-an-attachment-field/133933)

<div class="topic-metadata">

**Author:** [@silversun](https://discuss.elastic.co/u/silversun)\
**Replies:** 18\
**Last updated:** [June 4, 2018, 7:08pm UTC](https://discuss.elastic.co/t/extracting-full-text-from-an-attachment-field/133933 "2018-06-04T19:08:41Z")

</div>

I am a newbie for Elasticsearch. I'm working on an application which integrates Drupal with Elasticsearch 2.4. Our current ES index has data with a field called "file\_resource\_url" with a full URL path to a PDF/DOC file…

---

## [Percolate for multiple cluster](https://discuss.elastic.co/t/percolate-for-multiple-cluster/134461)

<div class="topic-metadata">

**Author:** [@Prabhakaran\_N](https://discuss.elastic.co/u/Prabhakaran_N)\
**Replies:** 1\
**Last updated:** [June 4, 2018, 6:15pm UTC](https://discuss.elastic.co/t/percolate-for-multiple-cluster/134461 "2018-06-04T18:15:28Z")

</div>

Hi , am trying to connect multiple nodes(planning to connect 10 machines) into cluster to support if one elastic down in any node. So ,did i have to index my percolate queries in all the nodes or indexing my percolate q…

---

## [How to prioritize more recent content?](https://discuss.elastic.co/t/how-to-prioritize-more-recent-content/134100)

<div class="topic-metadata">

**Author:** [@techliminal](https://discuss.elastic.co/u/techliminal)\
**Replies:** 2\
**Last updated:** [June 4, 2018, 6:15pm UTC](https://discuss.elastic.co/t/how-to-prioritize-more-recent-content/134100 "2018-06-04T18:15:24Z")

</div>

Hello there, I'm using ElasticSearch to search through a WordPress database. I'd like to create a query that returns results based on score, where the score is improved when a document is found with a more recent date,…

---

## [QueryStringQuery not working after upgrade to 5.6.7 from 2.4](https://discuss.elastic.co/t/querystringquery-not-working-after-upgrade-to-5-6-7-from-2-4/134466)

<div class="topic-metadata">

**Author:** [@sss](https://discuss.elastic.co/u/sss)\
**Replies:** 0\
**Last updated:** [June 4, 2018, 5:24pm UTC](https://discuss.elastic.co/t/querystringquery-not-working-after-upgrade-to-5-6-7-from-2-4/134466 "2018-06-04T17:24:59Z")

</div>

I have a field "instancename" in 2.4 which is String, not\_analyzed, and stored. I have indexed a document that has a value for that field as "ProblemFlow" The below query is not returning any hits on 5.6.7 server.. Howe…

---

## [Delete by query via @timestamp](https://discuss.elastic.co/t/delete-by-query-via-timestamp/134451)

<div class="topic-metadata">

**Author:** [@TechGeek](https://discuss.elastic.co/u/TechGeek)\
**Replies:** 8\
**Last updated:** [June 4, 2018, 4:45pm UTC](https://discuss.elastic.co/t/delete-by-query-via-timestamp/134451 "2018-06-04T16:45:52Z")

</div>

I want to delete highlighted doc in image i tried as below:- Though its deleting all records, please suggest the right command to achieve the Objective. POST poc/\_delete\_by\_query { "query":{ "range":{ "@timestamp":…

---

## [Can not find "suggest" stats in nodes stats response](https://discuss.elastic.co/t/can-not-find-suggest-stats-in-nodes-stats-response/134455)

<div class="topic-metadata">

**Author:** [@vangap](https://discuss.elastic.co/u/vangap)\
**Replies:** 0\
**Last updated:** [June 4, 2018, 4:09pm UTC](https://discuss.elastic.co/t/can-not-find-suggest-stats-in-nodes-stats-response/134455 "2018-06-04T16:09:03Z")

</div>

I see that "suggest" is supported based on this documentation. https://www.elastic.co/guide/en/elasticsearch/reference/5.6/cluster-nodes-stats.html#node-indices-stats I have 5.6.x version and I don't see "suggest" in t…

---

## [Performance of the cluster](https://discuss.elastic.co/t/performance-of-the-cluster/134430)

<div class="topic-metadata">

**Author:** [@asalma](https://discuss.elastic.co/u/asalma)\
**Replies:** 1\
**Last updated:** [June 4, 2018, 2:53pm UTC](https://discuss.elastic.co/t/performance-of-the-cluster/134430 "2018-06-04T14:53:38Z")

</div>

Hi, Please what is the command to meseure the performance of the cluster and the nodes, to show that when we add an other node the performance is more interesting ? By performance I mean : Time of response

---

## [Integration Test : org.elasticsearch.common.inject.CreationException: Guice creation errors:](https://discuss.elastic.co/t/integration-test-org-elasticsearch-common-inject-creationexception-guice-creation-errors/134442)

<div class="topic-metadata">

**Author:** [@arul\_since1975](https://discuss.elastic.co/u/arul_since1975)\
**Replies:** 0\
**Last updated:** [June 4, 2018, 2:43pm UTC](https://discuss.elastic.co/t/integration-test-org-elasticsearch-common-inject-creationexception-guice-creation-errors/134442 "2018-06-04T14:43:56Z")

</div>

Hi I am getting the following error in Integration Test case. This does not show up with my ElasticSearch bundle is 5.1.2. Right now the upgrade to ES 5.6.8 gives me this error. org.elasticsearch.common.inject.Creation…

---

## [Cannot convert MethodHandle(List,int)int to (Object,String)String](https://discuss.elastic.co/t/cannot-convert-methodhandle-list-int-int-to-object-string-string/134439)

<div class="topic-metadata">

**Author:** [@psu](https://discuss.elastic.co/u/psu)\
**Replies:** 0\
**Last updated:** [June 4, 2018, 2:28pm UTC](https://discuss.elastic.co/t/cannot-convert-methodhandle-list-int-int-to-object-string-string/134439 "2018-06-04T14:28:50Z")

</div>

I'm using \_update\_by\_query with script which contains many if's like this: ArrayList tmp=\[\]; if(ctx.\_source.anketa\["REGION"\]==3){tmp.add(2);} if(ctx.\_source.anketa\["REGION"\]==4){tmp.add(5);} if(ctx.\_source.anketa\["REGIO…

---

## [Do a suggestion query on multi-fields of differents index](https://discuss.elastic.co/t/do-a-suggestion-query-on-multi-fields-of-differents-index/134438)

<div class="topic-metadata">

**Author:** [@Akimbo](https://discuss.elastic.co/u/Akimbo)\
**Replies:** 0\
**Last updated:** [June 4, 2018, 2:28pm UTC](https://discuss.elastic.co/t/do-a-suggestion-query-on-multi-fields-of-differents-index/134438 "2018-06-04T14:28:34Z")

</div>

Is it possible to do a suggestion query on multi-fields of differents index ? I want to do the query on the "content" field of one index and on the "message" field of another index. I have tried it without success : GE…

---

## [Sum of unique ids](https://discuss.elastic.co/t/sum-of-unique-ids/134065)

<div class="topic-metadata">

**Author:** [@Islam\_Elshobokshy](https://discuss.elastic.co/u/Islam_Elshobokshy)\
**Replies:** 4\
**Last updated:** [June 4, 2018, 2:04pm UTC](https://discuss.elastic.co/t/sum-of-unique-ids/134065 "2018-06-04T14:04:48Z")

</div>

I have an aggregation that sums the column quantity, but I want it to sum the column quantity of unique IDS. Knowing that each unique id, has a unique quantity value. For example, if I have : id = 5 | quantity = 5 id…

[Previous page](https://discuss.elastic.co/c/elastic-stack/elasticsearch/6.md?page=1664)

[Next page](https://discuss.elastic.co/c/elastic-stack/elasticsearch/6.md?page=1666)
