# Elasticsearch

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

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

**Page:** 1465

---

## [How to fix array index out of bounds exception on Array field in Aggregation](https://discuss.elastic.co/t/how-to-fix-array-index-out-of-bounds-exception-on-array-field-in-aggregation/159292)

<div class="topic-metadata">

**Author:** [@pmminov](https://discuss.elastic.co/u/pmminov)\
**Replies:** 0\
**Last updated:** [December 4, 2018, 6:20am UTC](https://discuss.elastic.co/t/how-to-fix-array-index-out-of-bounds-exception-on-array-field-in-aggregation/159292 "2018-12-04T06:20:51Z")

</div>

I'm trying to get the values of a multified with my term aggregation and I'm seeing something odd. I have 2 fields, one is an array and the other is just a string. Both have a keyword field to store the keyword version o…

---

## [Regarding mapping a column of existing index to open nlp pipeline](https://discuss.elastic.co/t/regarding-mapping-a-column-of-existing-index-to-open-nlp-pipeline/159279)

<div class="topic-metadata">

**Author:** [@Neel.Gagan](https://discuss.elastic.co/u/Neel.Gagan)\
**Replies:** 0\
**Last updated:** [December 4, 2018, 4:11am UTC](https://discuss.elastic.co/t/regarding-mapping-a-column-of-existing-index-to-open-nlp-pipeline/159279 "2018-12-04T04:11:13Z")

</div>

Hi, i have been tryping to use opn-nlp plugin in my extising index. The index \[test\] had been crated using the fscrawler and i want to apply NLP onto the content field of my index \[test\]. Elasticsearch version-6.4.2 …

---

## [One of shards failed, index deleted, but data still visible](https://discuss.elastic.co/t/one-of-shards-failed-index-deleted-but-data-still-visible/159278)

<div class="topic-metadata">

**Author:** [@jordan](https://discuss.elastic.co/u/jordan)\
**Replies:** 0\
**Last updated:** [December 4, 2018, 4:01am UTC](https://discuss.elastic.co/t/one-of-shards-failed-index-deleted-but-data-still-visible/159278 "2018-12-04T04:01:57Z")

</div>

Can someone explain to me what's going on here. I'm on elastic cloud with hot-warm architecture. I was receiving warning 1 of 10 shards failed, I have deleted and recreated index with new docs. As you can see in Dis…

---

## [Analysing unstructured data](https://discuss.elastic.co/t/analysing-unstructured-data/159255)

<div class="topic-metadata">

**Author:** [@Lucyj](https://discuss.elastic.co/u/Lucyj)\
**Replies:** 2\
**Last updated:** [December 4, 2018, 3:53am UTC](https://discuss.elastic.co/t/analysing-unstructured-data/159255 "2018-12-04T03:53:36Z")

</div>

Hi, I have unstructured data that I want to bring into elastic. It contains IP address, in the form 223.58.1.19, and I was wondering what type of analyzer would I use to allow for it to stay together as a single token.

---

## [ES 6.5.0 why sql statement can't use sum?](https://discuss.elastic.co/t/es-6-5-0-why-sql-statement-cant-use-sum/159085)

<div class="topic-metadata">

**Author:** [@Angela\_Hsieh](https://discuss.elastic.co/u/Angela_Hsieh)\
**Replies:** 2\
**Last updated:** [December 4, 2018, 1:48am UTC](https://discuss.elastic.co/t/es-6-5-0-why-sql-statement-cant-use-sum/159085 "2018-12-04T01:48:47Z")

</div>

Hi, i use like in SQL at Elasticsearch 6.4.7 is OK, but upgrade to ES 6.5.0 , it can not working..... \_xpack/sql?format=txt {"query":"SELECT star\_demo\_city,sum(amt) FROM demo\_test WHERE (star\_demo\_city like 'MEMPHIS…

---

## [Elasticsearch email alert question](https://discuss.elastic.co/t/elasticsearch-email-alert-question/157507)

<div class="topic-metadata">

**Author:** [@S\_Z](https://discuss.elastic.co/u/S_Z)\
**Replies:** 3\
**Last updated:** [December 4, 2018, 1:28am UTC](https://discuss.elastic.co/t/elasticsearch-email-alert-question/157507 "2018-12-04T01:28:07Z")

</div>

Hi When I tried the x-pack alarm function, I had a problem. Kibana told me Failed to send e-mail to songzhao@union400.com. Below is the log I found in elasticsearch. I don't quite understand the problem. Where is it bec…

---

## [Index document count doesn't match discover hits count](https://discuss.elastic.co/t/index-document-count-doesnt-match-discover-hits-count/159264)

<div class="topic-metadata">

**Author:** [@popa](https://discuss.elastic.co/u/popa)\
**Replies:** 0\
**Last updated:** [December 4, 2018, 1:05am UTC](https://discuss.elastic.co/t/index-document-count-doesnt-match-discover-hits-count/159264 "2018-12-04T01:05:02Z")

</div>

I'm running into a strange issue where one of my indices is showing the incorrect number of documents. On the discovery section of Kibana, my index named winlogbeat-6.5.1-2018.12.02 shows 200,000+ hits, however, when I …

---

## [Query cache not being used](https://discuss.elastic.co/t/query-cache-not-being-used/156610)

<div class="topic-metadata">

**Author:** [@narcis](https://discuss.elastic.co/u/narcis)\
**Replies:** 6\
**Last updated:** [December 3, 2018, 10:28pm UTC](https://discuss.elastic.co/t/query-cache-not-being-used/156610 "2018-12-03T22:28:27Z")

</div>

Good morning, The problem we are facing is that query cache is not being used at all in our ES cluster. We don’t have any configuration for disabling it (at least, that we are aware of), but still the query cache is no…

---

## [How to move away from default document type mapping "doc"](https://discuss.elastic.co/t/how-to-move-away-from-default-document-type-mapping-doc/157095)

<div class="topic-metadata">

**Author:** [@mattsdevop](https://discuss.elastic.co/u/mattsdevop)\
**Replies:** 3\
**Last updated:** [December 3, 2018, 10:16pm UTC](https://discuss.elastic.co/t/how-to-move-away-from-default-document-type-mapping-doc/157095 "2018-12-03T22:16:55Z")

</div>

I discovered that the default template in 6.4.2 is currently setting the "doc" document\_type via mapping. The result of GET /customer-environment-2018.11.16/\_mapping is { "customer-environment-2018.11.16": { "m…

---

## [Scoring range queries by range size](https://discuss.elastic.co/t/scoring-range-queries-by-range-size/157592)

<div class="topic-metadata">

**Author:** [@monk](https://discuss.elastic.co/u/monk)\
**Replies:** 7\
**Last updated:** [December 3, 2018, 10:13pm UTC](https://discuss.elastic.co/t/scoring-range-queries-by-range-size/157592 "2018-12-03T22:13:24Z")

</div>

I have a field with type ip\_range. When I query for an IP address, I'd like to have the results returned in the order of most precise range to least. Is there a simple way to accomplish this? Perhaps I overlooked somethi…

---

## [Understanding doc and docCount values in explain response](https://discuss.elastic.co/t/understanding-doc-and-doccount-values-in-explain-response/158383)

<div class="topic-metadata">

**Author:** [@ParitoshBh](https://discuss.elastic.co/u/ParitoshBh)\
**Replies:** 3\
**Last updated:** [December 3, 2018, 7:41pm UTC](https://discuss.elastic.co/t/understanding-doc-and-doccount-values-in-explain-response/158383 "2018-12-03T19:41:33Z")

</div>

Here's the sample response after running query with explain set to true, \[0\] =\> Array ( \[value\] =\> 24.375515 \[description\] =\> score(doc=1115115,freq=1.0 = termFreq=1.0), product of: \[details\]…

---

## [What is X-Pack Watcher's Slack action "recipient" for?](https://discuss.elastic.co/t/what-is-x-pack-watchers-slack-action-recipient-for/159020)

<div class="topic-metadata">

**Author:** [@arisbanach](https://discuss.elastic.co/u/arisbanach)\
**Replies:** 4\
**Last updated:** [December 3, 2018, 5:23pm UTC](https://discuss.elastic.co/t/what-is-x-pack-watchers-slack-action-recipient-for/159020 "2018-12-03T17:23:31Z")

</div>

I can't seem to find any documentation on this. I configured the Slack app with a webhook to a certain channel. From what I can tell, with Slack it is one channel per webhook, so I'm not sure what the point of the "recip…

---

## [Documents gets score unexpectedly](https://discuss.elastic.co/t/documents-gets-score-unexpectedly/159159)

<div class="topic-metadata">

**Author:** [@zivari](https://discuss.elastic.co/u/zivari)\
**Replies:** 1\
**Last updated:** [December 3, 2018, 5:02pm UTC](https://discuss.elastic.co/t/documents-gets-score-unexpectedly/159159 "2018-12-03T17:02:23Z")

</div>

Hey guys, Iv noticed that when i use an empty query all of my docs are getting a score of 2. this is my query: { "query": { "bool": { "should": \[ { "bool": {} } \] } }, "sort": \[ { "\_score": { "order": "de…

---

## [How to write a watcher with match, term aggregation, and count?](https://discuss.elastic.co/t/how-to-write-a-watcher-with-match-term-aggregation-and-count/158551)

<div class="topic-metadata">

**Author:** [@elasticheart](https://discuss.elastic.co/u/elasticheart)\
**Replies:** 3\
**Last updated:** [December 3, 2018, 4:58pm UTC](https://discuss.elastic.co/t/how-to-write-a-watcher-with-match-term-aggregation-and-count/158551 "2018-12-03T16:58:19Z")

</div>

Hi, I am using 6.5 GA stack. I use heartbeat to ping to 3 hosts like hosts: \["192.168.0.1:9092","192.168.0.2:9093","192.168.0.3:9094"\] and push them to heartbeat index. Mapping can be found at http://freetexthost.com/dd…

---

## [Split Brain Elasticsearch Cluster](https://discuss.elastic.co/t/split-brain-elasticsearch-cluster/159201)

<div class="topic-metadata">

**Author:** [@markyjackson](https://discuss.elastic.co/u/markyjackson)\
**Replies:** 0\
**Last updated:** [December 3, 2018, 3:12pm UTC](https://discuss.elastic.co/t/split-brain-elasticsearch-cluster/159201 "2018-12-03T15:12:05Z")

</div>

Hello all. Hopefully this is the right area to post a question. I have a kubernetes Elasticsearch cluster with a replica count of 3. I have my env vars set to: \> - name: NUMBER\_OF\_MASTERS value: "1" - name…

---

## [Backward aggregation use case](https://discuss.elastic.co/t/backward-aggregation-use-case/158785)

<div class="topic-metadata">

**Author:** [@nfroidure](https://discuss.elastic.co/u/nfroidure)\
**Replies:** 3\
**Last updated:** [December 3, 2018, 3:06pm UTC](https://discuss.elastic.co/t/backward-aggregation-use-case/158785 "2018-12-03T15:06:18Z")

</div>

We want to find a day in the past (from now) where a sum aggregation reach a given ceil. Is there a way to do this without retrieving the whole data aggregated per day with a large enough range to ensure that the ceil wi…

---

## [SAML in Elastic Cloud - Support cant fix and are saying its Consulting now!](https://discuss.elastic.co/t/saml-in-elastic-cloud-support-cant-fix-and-are-saying-its-consulting-now/158805)

<div class="topic-metadata">

**Author:** [@hogbinj](https://discuss.elastic.co/u/hogbinj)\
**Replies:** 6\
**Last updated:** [December 3, 2018, 1:57pm UTC](https://discuss.elastic.co/t/saml-in-elastic-cloud-support-cant-fix-and-are-saying-its-consulting-now/158805 "2018-12-03T13:57:32Z")

</div>

I've tried to implement the advice here on securing a Cloud Cluster with SAML I added the following to the elasticsearch.yml being careful to use spaces rather than the tabs you get if you copy the example because YAML …

---

## [Elastic index mapping changing my date month value](https://discuss.elastic.co/t/elastic-index-mapping-changing-my-date-month-value/158873)

<div class="topic-metadata">

**Author:** [@Nevox](https://discuss.elastic.co/u/Nevox)\
**Replies:** 1\
**Last updated:** [December 3, 2018, 1:40pm UTC](https://discuss.elastic.co/t/elastic-index-mapping-changing-my-date-month-value/158873 "2018-12-03T13:40:35Z")

</div>

Hi guys, I created an other topic (Kibana ins't displaying correct dates) but i got no response since a long I'm a bit hurry on my project and I realized that my problem didnt come from kibana but from my index mapping …

---

## [How to import the data from SAP to Elastic Search?](https://discuss.elastic.co/t/how-to-import-the-data-from-sap-to-elastic-search/159185)

<div class="topic-metadata">

**Author:** [@Sunil\_Edupuganti](https://discuss.elastic.co/u/Sunil_Edupuganti)\
**Replies:** 0\
**Last updated:** [December 3, 2018, 1:30pm UTC](https://discuss.elastic.co/t/how-to-import-the-data-from-sap-to-elastic-search/159185 "2018-12-03T13:30:19Z")

</div>

Hi, How to import the data from SAP to Elastic Search?

---

## [How to import the data from MongoDB to Elastic search?](https://discuss.elastic.co/t/how-to-import-the-data-from-mongodb-to-elastic-search/159184)

<div class="topic-metadata">

**Author:** [@Sunil\_Edupuganti](https://discuss.elastic.co/u/Sunil_Edupuganti)\
**Replies:** 0\
**Last updated:** [December 3, 2018, 1:29pm UTC](https://discuss.elastic.co/t/how-to-import-the-data-from-mongodb-to-elastic-search/159184 "2018-12-03T13:29:28Z")

</div>

Hi, How to import the data from MongoDB to Elastic search and How to configure periodical syncronization of data from MongoDB to Elastic Search?

---

## [How to take Manual backup of AWS elasticsearch to s3 bucket with indexname](https://discuss.elastic.co/t/how-to-take-manual-backup-of-aws-elasticsearch-to-s3-bucket-with-indexname/158540)

<div class="topic-metadata">

**Author:** [@arun5635](https://discuss.elastic.co/u/arun5635)\
**Replies:** 14\
**Last updated:** [December 3, 2018, 1:15pm UTC](https://discuss.elastic.co/t/how-to-take-manual-backup-of-aws-elasticsearch-to-s3-bucket-with-indexname/158540 "2018-12-03T13:15:25Z")

</div>

Hi I am trying to take back up of my AWS elasticsearch indices . and I configured IAM role and policy and using curl to take the back . All the indices are backed up in s3 bucket. But inside the indices folder in s3 buck…

---

## [\[SOLVED\] Gradle command to run x-pack / SQL integration test?](https://discuss.elastic.co/t/solved-gradle-command-to-run-x-pack-sql-integration-test/159145)

<div class="topic-metadata">

**Author:** [@cbismuth](https://discuss.elastic.co/u/cbismuth)\
**Replies:** 1\
**Last updated:** [December 3, 2018, 1:11pm UTC](https://discuss.elastic.co/t/solved-gradle-command-to-run-x-pack-sql-integration-test/159145 "2018-12-03T13:11:41Z")

</div>

Hi, Could someone please tell me how to run an x-pack / SQL integration test from Gradle? Here is what I've done: ./gradlew :x-pack:plugin:sql:integTestRunner test -Dtests.class=org.elasticsearch.xpack.sql.qa.security…

---

## [Prevent checking existence of document ID when specified](https://discuss.elastic.co/t/prevent-checking-existence-of-document-id-when-specified/159175)

<div class="topic-metadata">

**Author:** [@iamredlus](https://discuss.elastic.co/u/iamredlus)\
**Replies:** 3\
**Last updated:** [December 3, 2018, 1:10pm UTC](https://discuss.elastic.co/t/prevent-checking-existence-of-document-id-when-specified/159175 "2018-12-03T13:10:18Z")

</div>

Hey It is well documented that when specifying an ID of a document upon ingestion, elasticsearch will first check whether that ID is already in use, and only then approve the new document for indexing. This comes with a…

---

## [Create elasticsearch cluster based on two windows machine](https://discuss.elastic.co/t/create-elasticsearch-cluster-based-on-two-windows-machine/159171)

<div class="topic-metadata">

**Author:** [@vsingh](https://discuss.elastic.co/u/vsingh)\
**Replies:** 0\
**Last updated:** [December 3, 2018, 12:33pm UTC](https://discuss.elastic.co/t/create-elasticsearch-cluster-based-on-two-windows-machine/159171 "2018-12-03T12:33:28Z")

</div>

Hello there, I have two windows 7 machine on the same segment. Can i create two machine based elasticsearch cluster for testing purpose. please suggest. Thanks.

---

## [Aggregations key with sub array](https://discuss.elastic.co/t/aggregations-key-with-sub-array/159170)

<div class="topic-metadata">

**Author:** [@Fr4nk](https://discuss.elastic.co/u/Fr4nk)\
**Replies:** 0\
**Last updated:** [December 3, 2018, 12:24pm UTC](https://discuss.elastic.co/t/aggregations-key-with-sub-array/159170 "2018-12-03T12:24:09Z")

</div>

I'll do my best to explain my challenge as clear as possible. We use Elastic for a store of products. And we have an aggregation (filter) with brand names. Now we'd like to use a brand\_id and a brand\_name for the filter…

---

## [ADD a Counter for Every build](https://discuss.elastic.co/t/add-a-counter-for-every-build/158687)

<div class="topic-metadata">

**Author:** [@mrashid](https://discuss.elastic.co/u/mrashid)\
**Replies:** 2\
**Last updated:** [December 3, 2018, 12:23pm UTC](https://discuss.elastic.co/t/add-a-counter-for-every-build/158687 "2018-12-03T12:23:24Z")

</div>

I am shipping logs(to ELK host) from two places for each build - using filebeat from one host to ELK host. using logstash plugin from jenkins to ELK host . Two indexes are getting generated. I want to pass a unique I…

---

## [Confused about setting up Kibana with X-Pack Security](https://discuss.elastic.co/t/confused-about-setting-up-kibana-with-x-pack-security/158448)

<div class="topic-metadata">

**Author:** [@arisbanach](https://discuss.elastic.co/u/arisbanach)\
**Replies:** 15\
**Last updated:** [December 3, 2018, 12:11pm UTC](https://discuss.elastic.co/t/confused-about-setting-up-kibana-with-x-pack-security/158448 "2018-12-03T12:11:31Z")

</div>

I'm doing a trial of X-Pack but am struggling with setting up TLS. I followed the instructions on how to use X-Pack certutil to create a CA, then use that to create certs for each Elasticsearch node. However, when I get …

---

## [Filter from message field](https://discuss.elastic.co/t/filter-from-message-field/159167)

<div class="topic-metadata">

**Author:** [@mrashid](https://discuss.elastic.co/u/mrashid)\
**Replies:** 0\
**Last updated:** [December 3, 2018, 12:08pm UTC](https://discuss.elastic.co/t/filter-from-message-field/159167 "2018-12-03T12:08:56Z")

</div>

I have data from Jenkins console and I am using Logstash Plugin to ship logs to ES . Now the problem is that I want to extract data from the "message" field and create a custom field. I understand that logstash gork is …

---

## [Best way to query nested objects in indexes where they don't exist](https://discuss.elastic.co/t/best-way-to-query-nested-objects-in-indexes-where-they-dont-exist/157923)

<div class="topic-metadata">

**Author:** [@wparad](https://discuss.elastic.co/u/wparad)\
**Replies:** 4\
**Last updated:** [December 3, 2018, 11:49am UTC](https://discuss.elastic.co/t/best-way-to-query-nested-objects-in-indexes-where-they-dont-exist/157923 "2018-12-03T11:49:39Z")

</div>

Right now it seems like I need to create a new nested property and add that to every index I have. Otherwise the "\[nested\] failed to find nested object under path \[MY\_OBJECT\_PATH\]" This topic which was closed: and th…

---

## [Managing / mapping of 365 entries per doc](https://discuss.elastic.co/t/managing-mapping-of-365-entries-per-doc/159111)

<div class="topic-metadata">

**Author:** [@devozanges](https://discuss.elastic.co/u/devozanges)\
**Replies:** 4\
**Last updated:** [December 3, 2018, 11:30am UTC](https://discuss.elastic.co/t/managing-mapping-of-365-entries-per-doc/159111 "2018-12-03T11:30:10Z")

</div>

For the context of real estate rental, I am provided among the data of each property to rent a string of 365 characters, which globally defines if the property to rent is free or not on the days of the year represented. …

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

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