# Elasticsearch

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

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

**Page:** 1632

---

## [Unable to write painless transform script for Mathematical operation](https://discuss.elastic.co/t/unable-to-write-painless-transform-script-for-mathematical-operation/133785)

<div class="topic-metadata">

**Author:** [@ishantanu](https://discuss.elastic.co/u/ishantanu)\
**Replies:** 1\
**Last updated:** [July 3, 2018, 8:27am UTC](https://discuss.elastic.co/t/unable-to-write-painless-transform-script-for-mathematical-operation/133785 "2018-07-03T08:27:02Z")

</div>

Hi, I am stuck at the point that I need to write a painless script which will calculate the percentage difference between two values. In other words, I need to calculate the % variation between the value on the current …

---

## [Scoring Elasticsearch by postion of query term in the indexed document](https://discuss.elastic.co/t/scoring-elasticsearch-by-postion-of-query-term-in-the-indexed-document/138332)

<div class="topic-metadata">

**Author:** [@Tahir\_Ahmad](https://discuss.elastic.co/u/Tahir_Ahmad)\
**Replies:** 0\
**Last updated:** [July 3, 2018, 8:23am UTC](https://discuss.elastic.co/t/scoring-elasticsearch-by-postion-of-query-term-in-the-indexed-document/138332 "2018-07-03T08:23:15Z")

</div>

I mean if I have When I index say following documents : doc 1: coconut red orange doc 2: orange coconut apple doc 3: coconut orange apple I search for a term "coconut" and get I following result: rank 1: coconut red…

---

## [Service shutdown with unexpected error while indexing monitoring document](https://discuss.elastic.co/t/service-shutdown-with-unexpected-error-while-indexing-monitoring-document/138005)

<div class="topic-metadata">

**Author:** [@gthang](https://discuss.elastic.co/u/gthang)\
**Replies:** 1\
**Last updated:** [July 3, 2018, 8:22am UTC](https://discuss.elastic.co/t/service-shutdown-with-unexpected-error-while-indexing-monitoring-document/138005 "2018-07-03T08:22:30Z")

</div>

We upgraded our instances to 6.3 last week, and today our elastic instances took a dive. Here are the output from the logs on 1 of the nodes. We have disabled monitoring and restarted and things are starting to collect…

---

## [How to pass the value of the query search to the message](https://discuss.elastic.co/t/how-to-pass-the-value-of-the-query-search-to-the-message/138314)

<div class="topic-metadata">

**Author:** [@VietCong](https://discuss.elastic.co/u/VietCong)\
**Replies:** 1\
**Last updated:** [July 3, 2018, 8:20am UTC](https://discuss.elastic.co/t/how-to-pass-the-value-of-the-query-search-to-the-message/138314 "2018-07-03T08:20:01Z")

</div>

I have the watcher as below but I would like to pass the value of the "message" field to the alert message to Slack. Can someone please help? I have my watch syntax as below: "text": "user minhhungvn107 attempted to exe…

---

## [Query 2 indices](https://discuss.elastic.co/t/query-2-indices/138222)

<div class="topic-metadata">

**Author:** [@LesioS](https://discuss.elastic.co/u/LesioS)\
**Replies:** 2\
**Last updated:** [July 3, 2018, 8:07am UTC](https://discuss.elastic.co/t/query-2-indices/138222 "2018-07-03T08:07:45Z")

</div>

I've 2 indices: maindata someData:keyword referrer:integer and dictionary refferer:keyword Is it possible, and if so then how to do that, to ask maindata for data with condition on dictionary? Soemthing similar to S…

---

## [Watcher multiple conditions for nested buckets](https://discuss.elastic.co/t/watcher-multiple-conditions-for-nested-buckets/138152)

<div class="topic-metadata">

**Author:** [@kskubala](https://discuss.elastic.co/u/kskubala)\
**Replies:** 1\
**Last updated:** [July 3, 2018, 8:16am UTC](https://discuss.elastic.co/t/watcher-multiple-conditions-for-nested-buckets/138152 "2018-07-03T08:16:56Z")

</div>

Hi ! I have many buckets and nested up to two buckets inside each of them. I want to iterate thru all of the buckets and check whether each of bucket's value is greater (for each bucket threshold is different). It mean…

---

## [How about import the Graph API in a maven Java project](https://discuss.elastic.co/t/how-about-import-the-graph-api-in-a-maven-java-project/138328)

<div class="topic-metadata">

**Author:** [@guofengzh](https://discuss.elastic.co/u/guofengzh)\
**Replies:** 1\
**Last updated:** [July 3, 2018, 8:12am UTC](https://discuss.elastic.co/t/how-about-import-the-graph-api-in-a-maven-java-project/138328 "2018-07-03T08:12:51Z")

</div>

Hi, I am trying ElasticSearch Graph in a java project. I use 6.3.0. I try to make the following sample works, I have the dependency on org.elasticsearch.client:x-pack-transport:6.3.0 in pom.xml, but this does not impo…

---

## [What is the equivalent of the removeAll function in Painless](https://discuss.elastic.co/t/what-is-the-equivalent-of-the-removeall-function-in-painless/138308)

<div class="topic-metadata">

**Author:** [@Kvin](https://discuss.elastic.co/u/Kvin)\
**Replies:** 1\
**Last updated:** [July 3, 2018, 6:35am UTC](https://discuss.elastic.co/t/what-is-the-equivalent-of-the-removeall-function-in-painless/138308 "2018-07-03T06:35:42Z")

</div>

We had the following line of Groovy script in 5.X: "inline":"ctx.\_source.all\_phone.removeAll{it.phone\_number == params.remove\_id} It throws the following error in 6.3.0: { "error": { "root\_cause": \[ { "type": "…

---

## [Watcher alerts not triggered](https://discuss.elastic.co/t/watcher-alerts-not-triggered/137220)

<div class="topic-metadata">

**Author:** [@VietCong](https://discuss.elastic.co/u/VietCong)\
**Replies:** 5\
**Last updated:** [July 3, 2018, 4:17am UTC](https://discuss.elastic.co/t/watcher-alerts-not-triggered/137220 "2018-07-03T04:17:10Z")

</div>

Hi, I have my basic watch to alert of log on failures. When I stimulated the watch it worked and generated a Slack message but the watch never triggered even though the conditions are met. Please find my alert below. {…

---

## [XPack License trail is not being accepted](https://discuss.elastic.co/t/xpack-license-trail-is-not-being-accepted/138281)

<div class="topic-metadata">

**Author:** [@warrior](https://discuss.elastic.co/u/warrior)\
**Replies:** 1\
**Last updated:** [July 3, 2018, 3:53am UTC](https://discuss.elastic.co/t/xpack-license-trail-is-not-being-accepted/138281 "2018-07-03T03:53:59Z")

</div>

I have subscribed for Xpack trail license but when I configured it ,xpack.license.self\_generated.type: trial the elasticsearch 6.3 is not accpeting it and please find my file configuration below and help me xpack.licen…

---

## [Registering S3 Repo with AWS ElasticSearch Service](https://discuss.elastic.co/t/registering-s3-repo-with-aws-elasticsearch-service/138297)

<div class="topic-metadata">

**Author:** [@ninjada](https://discuss.elastic.co/u/ninjada)\
**Replies:** 2\
**Last updated:** [July 3, 2018, 3:21am UTC](https://discuss.elastic.co/t/registering-s3-repo-with-aws-elasticsearch-service/138297 "2018-07-03T03:21:14Z")

</div>

Not sure this is the right place, but i've migrated the elasticsearch portion of my existing ELK stack from individual EC2 nodes, onto AWS Elasticsearch Service. My previous Elasticsearch cluster had automated backups w…

---

## [Using keyword type for mapping](https://discuss.elastic.co/t/using-keyword-type-for-mapping/137535)

<div class="topic-metadata">

**Author:** [@ybegus](https://discuss.elastic.co/u/ybegus)\
**Replies:** 6\
**Last updated:** [July 3, 2018, 1:51am UTC](https://discuss.elastic.co/t/using-keyword-type-for-mapping/137535 "2018-07-03T01:51:33Z")

</div>

I cxreate indices on daily base. I use the same mapping types for all of them. Mapping contains 23 fields. 6 of them are keyword. Also I prepared index pattern to process them together. I coilected data for several days…

---

## [My Elasticsearch nodes are not joining clusters](https://discuss.elastic.co/t/my-elasticsearch-nodes-are-not-joining-clusters/137988)

<div class="topic-metadata">

**Author:** [@warrior](https://discuss.elastic.co/u/warrior)\
**Replies:** 8\
**Last updated:** [July 2, 2018, 10:22pm UTC](https://discuss.elastic.co/t/my-elasticsearch-nodes-are-not-joining-clusters/137988 "2018-07-02T22:22:30Z")

</div>

My cluster nodes has 3 master nodes with discover sets to 2 but they are not able to join. failed to send join request to master OS : redhat and default networking is mutlicast but in Elasticsearch.yml file I'm using u…

---

## [Index.latest file not created on snapshot restore (2.x to 5.x)](https://discuss.elastic.co/t/index-latest-file-not-created-on-snapshot-restore-2-x-to-5-x/138277)

<div class="topic-metadata">

**Author:** [@BlargDoodle](https://discuss.elastic.co/u/BlargDoodle)\
**Replies:** 0\
**Last updated:** [July 2, 2018, 9:04pm UTC](https://discuss.elastic.co/t/index-latest-file-not-created-on-snapshot-restore-2-x-to-5-x/138277 "2018-07-02T21:04:20Z")

</div>

I'm writing some code to help with 2.x to 5.x upgrades for our ES storage and followed the instructions I found here: Restore snapshot from ES 2.4 to ES 5.2 and it worked for me in all my testing, but when I deployed it …

---

## [ElasticSearch Data Transformation](https://discuss.elastic.co/t/elasticsearch-data-transformation/138271)

<div class="topic-metadata">

**Author:** [@dhughes](https://discuss.elastic.co/u/dhughes)\
**Replies:** 1\
**Last updated:** [July 2, 2018, 8:56pm UTC](https://discuss.elastic.co/t/elasticsearch-data-transformation/138271 "2018-07-02T20:56:50Z")

</div>

I'm fairly well versed in ELK, but I've not yet figured out exactly the capabilities of other tools which integrate to ES data to transform it. I believe 'transform' is the right term to use here, from what I've been ab…

---

## [UpdateRequest with retryOnConflict using BulkProcessor failed](https://discuss.elastic.co/t/updaterequest-with-retryonconflict-using-bulkprocessor-failed/138273)

<div class="topic-metadata">

**Author:** [@yelin](https://discuss.elastic.co/u/yelin)\
**Replies:** 0\
**Last updated:** [July 2, 2018, 8:40pm UTC](https://discuss.elastic.co/t/updaterequest-with-retryonconflict-using-bulkprocessor-failed/138273 "2018-07-02T20:40:45Z")

</div>

I am using the Java High Level REST Client, and my UpdateRequest was working fine using the BulkProcessor originally. However, once I add something like "request.retryOnConflict(3);" to my UpdateRequest, and use the same…

---

## [Question on User Accounts During Setup](https://discuss.elastic.co/t/question-on-user-accounts-during-setup/137995)

<div class="topic-metadata">

**Author:** [@crichmond](https://discuss.elastic.co/u/crichmond)\
**Replies:** 2\
**Last updated:** [July 2, 2018, 6:56pm UTC](https://discuss.elastic.co/t/question-on-user-accounts-during-setup/137995 "2018-07-02T18:56:08Z")

</div>

We've decided to try out the Elastic Stack as a replacement for our current solution, and have run into a question/issue along the way. ElasticSearch has been setup and is running on Ubuntu 18 using the .deb install pa…

---

## [Elasticsearch | Use of "docvalue\_field" in a search query](https://discuss.elastic.co/t/elasticsearch-use-of-docvalue-field-in-a-search-query/138249)

<div class="topic-metadata">

**Author:** [@Saiprasad\_Krishnamur](https://discuss.elastic.co/u/Saiprasad_Krishnamur)\
**Replies:** 0\
**Last updated:** [July 2, 2018, 6:23pm UTC](https://discuss.elastic.co/t/elasticsearch-use-of-docvalue-field-in-a-search-query/138249 "2018-07-02T18:23:25Z")

</div>

Going through this documentation: https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-docvalue-fields.html I'm trying to find out a real use case as why one would need the docvalue\_field as pa…

---

## [Painless scripting error illegal\_argument\_exception "unexpected token \['('\] was expecting one of \[{\<EOF\>, ';'}\]"](https://discuss.elastic.co/t/painless-scripting-error-illegal-argument-exception-unexpected-token-was-expecting-one-of-eof/135547)

<div class="topic-metadata">

**Author:** [@ajp](https://discuss.elastic.co/u/ajp)\
**Replies:** 1\
**Last updated:** [July 2, 2018, 4:53pm UTC](https://discuss.elastic.co/t/painless-scripting-error-illegal-argument-exception-unexpected-token-was-expecting-one-of-eof/135547 "2018-07-02T16:53:43Z")

</div>

Running the following painless script against 6.2.4 returns an illegal\_argument\_exception "unexpected token \['('\] was expecting one of \[{, ';'}\]". def someVariable = ""; void someFunction(def arg) { def someVariabl…

---

## [Setting index.number\_of\_replicas =\> 0 by default in ES \>= 5](https://discuss.elastic.co/t/setting-index-number-of-replicas-0-by-default-in-es-5/138195)

<div class="topic-metadata">

**Author:** [@Alex\_Harvey](https://discuss.elastic.co/u/Alex_Harvey)\
**Replies:** 2\
**Last updated:** [July 2, 2018, 4:52pm UTC](https://discuss.elastic.co/t/setting-index-number-of-replicas-0-by-default-in-es-5/138195 "2018-07-02T16:52:39Z")

</div>

I am trying to build a single-node all-in-one ELK 6 cluster for development and testing. To do this and get a cluster that goes into green state, I need to ensure that all indices inherit a setting index.number\_of\_replic…

---

## [ML Adv Job Config - Only .ml and .kibana show in Input index drop down](https://discuss.elastic.co/t/ml-adv-job-config-only-ml-and-kibana-show-in-input-index-drop-down/138007)

<div class="topic-metadata">

**Author:** [@jc034240](https://discuss.elastic.co/u/jc034240)\
**Replies:** 3\
**Last updated:** [July 2, 2018, 4:32pm UTC](https://discuss.elastic.co/t/ml-adv-job-config-only-ml-and-kibana-show-in-input-index-drop-down/138007 "2018-07-02T16:32:56Z")

</div>

Hello everyone, I'm trying to create an advanced job (via gui) and .ml and .kibana are the only indices that show in the "Input index" drop down box. My steps: "Create and advanced job" "Input index" radial button "I…

---

## [No meaningful logs from bulk write operation failure](https://discuss.elastic.co/t/no-meaningful-logs-from-bulk-write-operation-failure/137662)

<div class="topic-metadata">

**Author:** [@rkalluri](https://discuss.elastic.co/u/rkalluri)\
**Replies:** 1\
**Last updated:** [July 2, 2018, 4:22pm UTC](https://discuss.elastic.co/t/no-meaningful-logs-from-bulk-write-operation-failure/137662 "2018-07-02T16:22:43Z")

</div>

I am trying to index some geo\_point data using apache spark, the operation fails with out giving me any information on what is wrong and how I can fix it. When I index the field as string everything checks out. Any clues…

---

## [Elastic search using more RAM](https://discuss.elastic.co/t/elastic-search-using-more-ram/138144)

<div class="topic-metadata">

**Author:** [@arvindan\_ta](https://discuss.elastic.co/u/arvindan_ta)\
**Replies:** 7\
**Last updated:** [July 2, 2018, 4:10pm UTC](https://discuss.elastic.co/t/elastic-search-using-more-ram/138144 "2018-07-02T16:10:37Z")

</div>

Hi , I am using a 26 GB Ram machine . And I have allocated 8gb as heap size . I have some data in mongodb and am doing a bulk api request to put the data from mongo to elastic search . When I do this operation , I see…

---

## [Uneven shard size after reindex](https://discuss.elastic.co/t/uneven-shard-size-after-reindex/137986)

<div class="topic-metadata">

**Author:** [@Mauro\_Julian\_Fernand](https://discuss.elastic.co/u/Mauro_Julian_Fernand)\
**Replies:** 2\
**Last updated:** [July 2, 2018, 3:28pm UTC](https://discuss.elastic.co/t/uneven-shard-size-after-reindex/137986 "2018-07-02T15:28:43Z")

</div>

I left ES reindexing 30 indices to 1 with 8 shards, and when seeing the shard stats when I came to work today I see this: GET \_cat/shards/graylog\_0-30?v&s=shard&h=shard,store,node shard store node 0 41.4gb node0 1 …

---

## [Using ES 6.3.0: Where is the RequestOptions class?](https://discuss.elastic.co/t/using-es-6-3-0-where-is-the-requestoptions-class/136758)

<div class="topic-metadata">

**Author:** [@gmarshall56](https://discuss.elastic.co/u/gmarshall56)\
**Replies:** 3\
**Last updated:** [July 2, 2018, 3:13pm UTC](https://discuss.elastic.co/t/using-es-6-3-0-where-is-the-requestoptions-class/136758 "2018-07-02T15:13:52Z")

</div>

I am trying to migrate my code to the ES version 6.30. According to this documentation page: ... In my java class I am to instantiate a IndexResponse opject like this: IndexResponse response = client.index(request, …

---

## [Adding new index based on field](https://discuss.elastic.co/t/adding-new-index-based-on-field/138236)

<div class="topic-metadata">

**Author:** [@ELK\_developer99](https://discuss.elastic.co/u/ELK_developer99)\
**Replies:** 0\
**Last updated:** [July 2, 2018, 3:05pm UTC](https://discuss.elastic.co/t/adding-new-index-based-on-field/138236 "2018-07-02T15:05:57Z")

</div>

I'm trying to parse my JSON data in the logstash config and send the JSON to elasticSearch depending on the week. My data fields has the specific date. Example: I have a date:"MM-DD-YYYY" as a field in the JSON, but I w…

---

## [UpdateByQueryRequestBuilder and versionConflicts](https://discuss.elastic.co/t/updatebyqueryrequestbuilder-and-versionconflicts/138234)

<div class="topic-metadata">

**Author:** [@imaad](https://discuss.elastic.co/u/imaad)\
**Replies:** 0\
**Last updated:** [July 2, 2018, 2:55pm UTC](https://discuss.elastic.co/t/updatebyqueryrequestbuilder-and-versionconflicts/138234 "2018-07-02T14:55:38Z")

</div>

Hello, I have a question about the update by query method, in my java application my method look like this : public ActionFuture\<BulkByScrollResponse\> executeUpdateByQuery(String indexName, Map\<String, Object\> filterFi…

---

## [ES 6.3.0 Log file slammed over 100KB](https://discuss.elastic.co/t/es-6-3-0-log-file-slammed-over-100kb/137841)

<div class="topic-metadata">

**Author:** [@gmarshall56](https://discuss.elastic.co/u/gmarshall56)\
**Replies:** 3\
**Last updated:** [June 29, 2018, 9:17pm UTC](https://discuss.elastic.co/t/es-6-3-0-log-file-slammed-over-100kb/137841 "2018-06-29T21:17:58Z")

</div>

Hello: I am running a indexing process that builds an index from a relation database table containing over 26,000 rows. After this process runs I see my log file has ballooned to over 100,000 KB big! Here is just a ti…

---

## [Having an issue with Nest and BulkDescriptor](https://discuss.elastic.co/t/having-an-issue-with-nest-and-bulkdescriptor/138046)

<div class="topic-metadata">

**Author:** [@Doug\_Nelson1](https://discuss.elastic.co/u/Doug_Nelson1)\
**Replies:** 2\
**Last updated:** [July 2, 2018, 2:11pm UTC](https://discuss.elastic.co/t/having-an-issue-with-nest-and-bulkdescriptor/138046 "2018-07-02T14:11:17Z")

</div>

I am having an issue with following code and it should work. I am trying to use the bulk api to perform partial updates on documents. The issue I am having is the execution hangs on the bulkRequest.Update method. Noth…

---

## [Struggling with aggregation of terms using values from another field](https://discuss.elastic.co/t/struggling-with-aggregation-of-terms-using-values-from-another-field/138223)

<div class="topic-metadata">

**Author:** [@touchstonemark](https://discuss.elastic.co/u/touchstonemark)\
**Replies:** 0\
**Last updated:** [July 2, 2018, 2:08pm UTC](https://discuss.elastic.co/t/struggling-with-aggregation-of-terms-using-values-from-another-field/138223 "2018-07-02T14:08:45Z")

</div>

Hi all, I have one field in my index which contains engineers names, and another field which contains ticket notes - and also within the notes text are the engineers names. I need to count how many records each engineer…

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

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