# Elasticsearch

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

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

**Page:** 1609

---

## [How to create new index from old index fields](https://discuss.elastic.co/t/how-to-create-new-index-from-old-index-fields/141174)

<div class="topic-metadata">

**Author:** [@cool\_arun](https://discuss.elastic.co/u/cool_arun)\
**Replies:** 0\
**Last updated:** [July 23, 2018, 12:30pm UTC](https://discuss.elastic.co/t/how-to-create-new-index-from-old-index-fields/141174 "2018-07-23T12:30:56Z")

</div>

i'm trying to create new index with data from the existing index , could you suggest me the best approach to do that. EXISTING SAMPLE INDEX STRUCTURE (INDEX-1): { "name": "arun", "my\_list: \[ "john", "peter", "julie"\] …

---

## [Can't store term\_vector](https://discuss.elastic.co/t/cant-store-term-vector/141176)

<div class="topic-metadata">

**Author:** [@Kornelia\_Watson](https://discuss.elastic.co/u/Kornelia_Watson)\
**Replies:** 0\
**Last updated:** [July 23, 2018, 12:34pm UTC](https://discuss.elastic.co/t/cant-store-term-vector/141176 "2018-07-23T12:34:54Z")

</div>

Hi all, If I understand documentation correctly (v 5.1 term\_vector | Elasticsearch Guide \[5.1\] | Elastic) I should be able to set term\_vector by doing "term\_vector": "yes". But when I do so I get: \[mapper\_parsing\_exc…

---

## [Custom format of displayed array objects](https://discuss.elastic.co/t/custom-format-of-displayed-array-objects/140915)

<div class="topic-metadata">

**Author:** [@kskubala](https://discuss.elastic.co/u/kskubala)\
**Replies:** 3\
**Last updated:** [July 23, 2018, 11:46am UTC](https://discuss.elastic.co/t/custom-format-of-displayed-array-objects/140915 "2018-07-23T11:46:21Z")

</div>

Hi, I have a watcher that as an action for met condition sends an email. In the e-mail body I send arrayList object with all those aggregated data that met the condition. Transformation is written in painless. "action…

---

## [Cant understand watcher keywords](https://discuss.elastic.co/t/cant-understand-watcher-keywords/141040)

<div class="topic-metadata">

**Author:** [@rijinmp](https://discuss.elastic.co/u/rijinmp)\
**Replies:** 5\
**Last updated:** [July 23, 2018, 11:45am UTC](https://discuss.elastic.co/t/cant-understand-watcher-keywords/141040 "2018-07-23T11:45:38Z")

</div>

When I am started to study watcher , i see lots of keywords in watcher examples . Samples are showing below 1)ctx.payload.hits.total 2)ctx.payload.first.path 3)ctx.metadata.color 4)ctx.payload.aggregations.bucket\_r…

---

## [Search with multiple keyword(must + should) and sort on other column?](https://discuss.elastic.co/t/search-with-multiple-keyword-must-should-and-sort-on-other-column/141159)

<div class="topic-metadata">

**Author:** [@BDuck](https://discuss.elastic.co/u/BDuck)\
**Replies:** 0\
**Last updated:** [July 23, 2018, 11:40am UTC](https://discuss.elastic.co/t/search-with-multiple-keyword-must-should-and-sort-on-other-column/141159 "2018-07-23T11:40:42Z")

</div>

First of all say hello to staffs and users here :slightly\_smiling\_face: I have a small question on es search function Assume I have few data like: count:100 text:monkey count:90 text:king count:80 text:monkey ki…

---

## [Failing to PUT in an Index Template](https://discuss.elastic.co/t/failing-to-put-in-an-index-template/140563)

<div class="topic-metadata">

**Author:** [@Spitza\_Spitza](https://discuss.elastic.co/u/Spitza_Spitza)\
**Replies:** 2\
**Last updated:** [July 23, 2018, 11:40am UTC](https://discuss.elastic.co/t/failing-to-put-in-an-index-template/140563 "2018-07-23T11:40:34Z")

</div>

Using version 6.3. I tried to update /\_template/logstash with "index.number\_of\_replicas": "0" So I took the one I have now { "logstash": { "order": 0, "version": 60001, "index\_patterns": \[ "logsta…

---

## [How to Co-relate two document in the same index?](https://discuss.elastic.co/t/how-to-co-relate-two-document-in-the-same-index/141140)

<div class="topic-metadata">

**Author:** [@harish\_hothi](https://discuss.elastic.co/u/harish_hothi)\
**Replies:** 2\
**Last updated:** [July 23, 2018, 11:04am UTC](https://discuss.elastic.co/t/how-to-co-relate-two-document-in-the-same-index/141140 "2018-07-23T11:04:22Z")

</div>

Hi all, I want to co-relate two documents. Both the documents resides in same elastic index. My goal is to achive something like, if my logs says system is up but there is not system down in last one hour then it is goo…

---

## [How to get grand parent details also in the response when querying for grandchild documents](https://discuss.elastic.co/t/how-to-get-grand-parent-details-also-in-the-response-when-querying-for-grandchild-documents/141139)

<div class="topic-metadata">

**Author:** [@muthucse](https://discuss.elastic.co/u/muthucse)\
**Replies:** 0\
**Last updated:** [July 23, 2018, 10:25am UTC](https://discuss.elastic.co/t/how-to-get-grand-parent-details-also-in-the-response-when-querying-for-grandchild-documents/141139 "2018-07-23T10:25:19Z")

</div>

I have a mapping structure of parent -\> child -\> grandchild. Company -\> brand -\> product search filters applied at company and brand level. Sorting applied at product level. How to get company details also as inner hi…

---

## [How to upload data to elasticsearch?](https://discuss.elastic.co/t/how-to-upload-data-to-elasticsearch/141135)

<div class="topic-metadata">

**Author:** [@yolo\_1900](https://discuss.elastic.co/u/yolo_1900)\
**Replies:** 0\
**Last updated:** [July 23, 2018, 9:59am UTC](https://discuss.elastic.co/t/how-to-upload-data-to-elasticsearch/141135 "2018-07-23T09:59:20Z")

</div>

Hello everyone, I am trying to upload the data to elasticsearch using helpers.bulk from elasticsearch import Elasticsearch, helpers data = \[\] my\_data = {"\_index": ES\_INDEX.format(strftime("%Y.%m.%d", gmtime())), …

---

## [Can't register snapshot repository in elasticsearch](https://discuss.elastic.co/t/cant-register-snapshot-repository-in-elasticsearch/141131)

<div class="topic-metadata">

**Author:** [@layla](https://discuss.elastic.co/u/layla)\
**Replies:** 0\
**Last updated:** [July 23, 2018, 9:55am UTC](https://discuss.elastic.co/t/cant-register-snapshot-repository-in-elasticsearch/141131 "2018-07-23T09:55:52Z")

</div>

I would like to register snapshot repository in elasticsearch to S3 in order to backup my data. However, I got below error message when running my python script. Anyone can help? thanks!! Here is the script: import bot…

---

## [Date range query with QueryStringBuilder](https://discuss.elastic.co/t/date-range-query-with-querystringbuilder/141127)

<div class="topic-metadata">

**Author:** [@Josef\_Fritzer](https://discuss.elastic.co/u/Josef_Fritzer)\
**Replies:** 0\
**Last updated:** [July 23, 2018, 9:29am UTC](https://discuss.elastic.co/t/date-range-query-with-querystringbuilder/141127 "2018-07-23T09:29:52Z")

</div>

Hi guys, My document looks like that JSON: "SubmissionVersion\_state":"NOT\_COMMISSIONED", "SubmissionVersion\_remark":"", "SubmissionVersion\_dueDate":{ "year":2018, "month":6, "dayOfMonth":17, "hourOfDay":13, "min…

---

## [Best ways to prevent data lost in elastic](https://discuss.elastic.co/t/best-ways-to-prevent-data-lost-in-elastic/140055)

<div class="topic-metadata">

**Author:** [@hoey123](https://discuss.elastic.co/u/hoey123)\
**Replies:** 3\
**Last updated:** [July 23, 2018, 8:40am UTC](https://discuss.elastic.co/t/best-ways-to-prevent-data-lost-in-elastic/140055 "2018-07-23T08:40:53Z")

</div>

we decide to use Elasticsearch for our data store and handle different search scenarios with that. data is critical and should never lost. we should store it for 10 days. because data is time series we want to create i…

---

## [Can I setting time to auto split index by date on elasticsearch?](https://discuss.elastic.co/t/can-i-setting-time-to-auto-split-index-by-date-on-elasticsearch/141099)

<div class="topic-metadata">

**Author:** [@chayapon1219](https://discuss.elastic.co/u/chayapon1219)\
**Replies:** 0\
**Last updated:** [July 23, 2018, 7:42am UTC](https://discuss.elastic.co/t/can-i-setting-time-to-auto-split-index-by-date-on-elasticsearch/141099 "2018-07-23T07:42:31Z")

</div>

Hello everyone, I'm new for ELK stack, I have one JAVA program to get many logs from MQ and put it into elasticsearch and set index name patterns = xxx-yyyy.MM.dd (such as xxx-2018-08-23). index auto split at UTC. timez…

---

## [Getting lots of watcher errors since upgrade to 6.3.1](https://discuss.elastic.co/t/getting-lots-of-watcher-errors-since-upgrade-to-6-3-1/139054)

<div class="topic-metadata">

**Author:** [@jamesl](https://discuss.elastic.co/u/jamesl)\
**Replies:** 17\
**Last updated:** [July 23, 2018, 7:26am UTC](https://discuss.elastic.co/t/getting-lots-of-watcher-errors-since-upgrade-to-6-3-1/139054 "2018-07-23T07:26:38Z")

</div>

Hi. Since my upgrade from 6.3.0 to 6.3.1 I am seeing lots of these error messages in my elasticsearch system log file: \> \[2018-07-08T11:24:21,265\]\[WARN \]\[o.e.x.w.e.ExecutionService\] \[els04\] failed to execute watch \[V4m…

---

## [Elasticsearch - compound index or discrete indexes?](https://discuss.elastic.co/t/elasticsearch-compound-index-or-discrete-indexes/140970)

<div class="topic-metadata">

**Author:** [@Jose\_Ramierez](https://discuss.elastic.co/u/Jose_Ramierez)\
**Replies:** 7\
**Last updated:** [July 23, 2018, 7:11am UTC](https://discuss.elastic.co/t/elasticsearch-compound-index-or-discrete-indexes/140970 "2018-07-23T07:11:03Z")

</div>

Elasticsearch 6.3 (but our ES experience is all from earlier versions) We have a typical multi tenant cloud app. 5,000 accounts on the cloud app. Each account has 500 to 1,000,000 records/documents. When we use a singl…

---

## [Get distinct fields for given filters](https://discuss.elastic.co/t/get-distinct-fields-for-given-filters/141026)

<div class="topic-metadata">

**Author:** [@chits](https://discuss.elastic.co/u/chits)\
**Replies:** 3\
**Last updated:** [July 23, 2018, 7:03am UTC](https://discuss.elastic.co/t/get-distinct-fields-for-given-filters/141026 "2018-07-23T07:03:35Z")

</div>

Hi , I want to get distinct fields in an index for given filter, for eg for the below data |Name|age |Country|Amount| |Alfreds|34|Germeny|100| |Andrew|43|U.K|333| |Raj|54|India|4553| |John|43|U.K|325| |Ana|32|Mex…

---

## [Microsoft Teams and Watcher](https://discuss.elastic.co/t/microsoft-teams-and-watcher/141016)

<div class="topic-metadata">

**Author:** [@Ron\_3](https://discuss.elastic.co/u/Ron_3)\
**Replies:** 1\
**Last updated:** [July 23, 2018, 7:00am UTC](https://discuss.elastic.co/t/microsoft-teams-and-watcher/141016 "2018-07-23T07:00:18Z")

</div>

We're trying to alert to MS teams via a Watcher Webhook, we've played with this a few ways without any luck. Based on our research you really just need 3 values to post to teams. In Headers "Content-Type": "applicati…

---

## [Error installing elasticsearch on Linux with IBM Java](https://discuss.elastic.co/t/error-installing-elasticsearch-on-linux-with-ibm-java/141092)

<div class="topic-metadata">

**Author:** [@Cyril\_Lindenmann](https://discuss.elastic.co/u/Cyril_Lindenmann)\
**Replies:** 1\
**Last updated:** [July 23, 2018, 6:57am UTC](https://discuss.elastic.co/t/error-installing-elasticsearch-on-linux-with-ibm-java/141092 "2018-07-23T06:57:32Z")

</div>

Hi, I was trying to install elasticsearch-6.3.0 on my Linux server (RHEL 6.8) using following command: rpm -ivh /path/to/elasticsearch-oss-6.3.1.rpm Which threw this exception: warning: /data/softwarePackages/GrayL…

---

## [Hardware that can last longer and IOPS needed](https://discuss.elastic.co/t/hardware-that-can-last-longer-and-iops-needed/140845)

<div class="topic-metadata">

**Author:** [@pastechecker](https://discuss.elastic.co/u/pastechecker)\
**Replies:** 4\
**Last updated:** [July 23, 2018, 6:56am UTC](https://discuss.elastic.co/t/hardware-that-can-last-longer-and-iops-needed/140845 "2018-07-23T06:56:41Z")

</div>

Hello. I am planning to build local cluster with following assumptions and hardware which I already have. Worker nodes: Number of worker nodes: 2 RAM: 64 GB DDR4 physical per node, 32 GB per heap. CPU: AMD Ryzen™ Th…

---

## [How will i know that elasticsearch has crashed or stopped working?](https://discuss.elastic.co/t/how-will-i-know-that-elasticsearch-has-crashed-or-stopped-working/140988)

<div class="topic-metadata">

**Author:** [@Shrimp-Fried-Rice](https://discuss.elastic.co/u/Shrimp-Fried-Rice)\
**Replies:** 4\
**Last updated:** [July 23, 2018, 5:54am UTC](https://discuss.elastic.co/t/how-will-i-know-that-elasticsearch-has-crashed-or-stopped-working/140988 "2018-07-23T05:54:45Z")

</div>

i have few questions in mind, Is there way to get notified if elasticsearch crashes or stops working ? is there system in place to auto start elasticsearch if it crashes ? just like in mysql ? can i start elasti…

---

## [Recommended HighLevelRestClient configuration for Spring App](https://discuss.elastic.co/t/recommended-highlevelrestclient-configuration-for-spring-app/140427)

<div class="topic-metadata">

**Author:** [@kishoreji](https://discuss.elastic.co/u/kishoreji)\
**Replies:** 1\
**Last updated:** [July 23, 2018, 5:32am UTC](https://discuss.elastic.co/t/recommended-highlevelrestclient-configuration-for-spring-app/140427 "2018-07-23T05:32:55Z")

</div>

Hi, Is it a good practice to create HighLevelRestClient as a bean in Spring config and autowire it wherever its needed? like below: /\*\* Configuration Bean \*/ @Configuration public class ElasticsearchConfig { @Value(…

---

## [Kubernetes or VM?](https://discuss.elastic.co/t/kubernetes-or-vm/140966)

<div class="topic-metadata">

**Author:** [@Gabriel1](https://discuss.elastic.co/u/Gabriel1)\
**Replies:** 3\
**Last updated:** [July 23, 2018, 4:20am UTC](https://discuss.elastic.co/t/kubernetes-or-vm/140966 "2018-07-23T04:20:18Z")

</div>

Hi ! I would like to understand the pros / cons of deploying Elasticsearch on Kubernetes or VMs ? many thanks !! : ) Gab

---

## [Possible Bug: Request Cache Stats remain all zeros since upgrading to 6.3.1](https://discuss.elastic.co/t/possible-bug-request-cache-stats-remain-all-zeros-since-upgrading-to-6-3-1/141069)

<div class="topic-metadata">

**Author:** [@kwu](https://discuss.elastic.co/u/kwu)\
**Replies:** 0\
**Last updated:** [July 23, 2018, 3:39am UTC](https://discuss.elastic.co/t/possible-bug-request-cache-stats-remain-all-zeros-since-upgrading-to-6-3-1/141069 "2018-07-23T03:39:54Z")

</div>

Since upgrading one of our production cluster from 6.2.4 to 6.3.1 , the monitoring systems showing all Request Cache Stats as zeros, including cache size/hit/miss/evict ,etc. These stats are collected from node stats a…

---

## [The new Centos 7, RPM installation cannot run](https://discuss.elastic.co/t/the-new-centos-7-rpm-installation-cannot-run/141013)

<div class="topic-metadata">

**Author:** [@saki](https://discuss.elastic.co/u/saki)\
**Replies:** 8\
**Last updated:** [July 23, 2018, 2:15am UTC](https://discuss.elastic.co/t/the-new-centos-7-rpm-installation-cannot-run/141013 "2018-07-23T02:15:30Z")

</div>

I followed the guide,complete installation. but curl -XGET 'http://localhost:9200' didn't work. So I check systemctl status elasticsearch.service -l and get: Loaded: loaded (/usr/lib/systemd/system/elasticsearch.servic…

---

## [How can I filter for a specific field value in this query?](https://discuss.elastic.co/t/how-can-i-filter-for-a-specific-field-value-in-this-query/140858)

<div class="topic-metadata">

**Author:** [@Sjaak01](https://discuss.elastic.co/u/Sjaak01)\
**Replies:** 2\
**Last updated:** [July 23, 2018, 12:27am UTC](https://discuss.elastic.co/t/how-can-i-filter-for-a-specific-field-value-in-this-query/140858 "2018-07-23T00:27:13Z")

</div>

Hi, I made this query and it gives me the results I'm looking for however I want to get the SUM where field wan\_int matches wan1 (I got multiple wan interfaces). I tried adding filters and a query but I can't get it to …

---

## [No handler for type \[attachment\] declared on field \[my\_attachment\]](https://discuss.elastic.co/t/no-handler-for-type-attachment-declared-on-field-my-attachment/139441)

<div class="topic-metadata">

**Author:** [@Suleyman\_Yalman](https://discuss.elastic.co/u/Suleyman_Yalman)\
**Replies:** 13\
**Last updated:** [July 22, 2018, 9:24pm UTC](https://discuss.elastic.co/t/no-handler-for-type-attachment-declared-on-field-my-attachment/139441 "2018-07-22T21:24:32Z")

</div>

Hi to all. when l run this in postman : { "person" : { "properties" : { "my\_attachment" : { "type" : "attachment" } } } } l got this respond : { "error": { "root\_cause": \[ { "type": "mapper\_parsing\_exceptio…

---

## [ES6 bug - Explain API fails deterministically for specific set of search parameters value](https://discuss.elastic.co/t/es6-bug-explain-api-fails-deterministically-for-specific-set-of-search-parameters-value/140968)

<div class="topic-metadata">

**Author:** [@pungent](https://discuss.elastic.co/u/pungent)\
**Replies:** 1\
**Last updated:** [July 22, 2018, 9:17pm UTC](https://discuss.elastic.co/t/es6-bug-explain-api-fails-deterministically-for-specific-set-of-search-parameters-value/140968 "2018-07-22T21:17:05Z")

</div>

I am using ES6.2 (on elastic.co) and I have a giant search query that has many in-line painless scripting. And in that search query, I have "explain": true to see the result scoring explanation. Most of the time the se…

---

## [Elasticsearch seems to have compatibility issues with JAVA](https://discuss.elastic.co/t/elasticsearch-seems-to-have-compatibility-issues-with-java/141027)

<div class="topic-metadata">

**Author:** [@saki](https://discuss.elastic.co/u/saki)\
**Replies:** 1\
**Last updated:** [July 22, 2018, 9:14pm UTC](https://discuss.elastic.co/t/elasticsearch-seems-to-have-compatibility-issues-with-java/141027 "2018-07-22T21:14:16Z")

</div>

I configured the latest JAVA JDK:Java(TM) SE Runtime Environment (build 1.8.0\_181-b13). But I can't launch Elasticsearch anyway.This. When I yum installed the OpenJDK, the problem was solved. OMG,It took me three days…

---

## [Specific deployment](https://discuss.elastic.co/t/specific-deployment/140593)

<div class="topic-metadata">

**Author:** [@cloudenv](https://discuss.elastic.co/u/cloudenv)\
**Replies:** 5\
**Last updated:** [July 22, 2018, 8:52pm UTC](https://discuss.elastic.co/t/specific-deployment/140593 "2018-07-22T20:52:45Z")

</div>

OK so to put it Appa Whats default username and password to Elasticsearch on Ubuntu 16.04? Ive apt-ed, started deamon, and want to edit elasticsearch.yml but there is nowhere to be set.

---

## [Date is too short](https://discuss.elastic.co/t/date-is-too-short/141037)

<div class="topic-metadata">

**Author:** [@magedmakled](https://discuss.elastic.co/u/magedmakled)\
**Replies:** 1\
**Last updated:** [July 22, 2018, 8:47pm UTC](https://discuss.elastic.co/t/date-is-too-short/141037 "2018-07-22T20:47:15Z")

</div>

I'm using Elasticsearch with ruby. I have a Date field that is a Datetime converted to "iso8601" on the format "2018-07-29T13:00:00Z" . the field is formatted as a date\_time\_no\_millis attribute :starts\_at, Date, mapp…

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

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