# Elasticsearch

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

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

**Page:** 1867

---

## [How to get tokens for a document?](https://discuss.elastic.co/t/how-to-get-tokens-for-a-document/110083)

<div class="topic-metadata">

**Author:** [@VidyVideni](https://discuss.elastic.co/u/VidyVideni)\
**Replies:** 1\
**Last updated:** [December 5, 2017, 5:12am UTC](https://discuss.elastic.co/t/how-to-get-tokens-for-a-document/110083 "2017-12-05T05:12:40Z")

</div>

I need to get all tokens for a document when debug, so I know what exact tokens indexed in elasticsearch , this can help me understand why a query doesn't get any result when it supposed to be . any way to do this ple…

---

## [Filebeat 6.0.0 can't load template to elasticsearch](https://discuss.elastic.co/t/filebeat-6-0-0-cant-load-template-to-elasticsearch/110250)

<div class="topic-metadata">

**Author:** [@manila123](https://discuss.elastic.co/u/manila123)\
**Replies:** 0\
**Last updated:** [December 5, 2017, 4:38am UTC](https://discuss.elastic.co/t/filebeat-6-0-0-cant-load-template-to-elasticsearch/110250 "2017-12-05T04:38:54Z")

</div>

Hi Guys, I need your help, I installed ELK 6.0.0 packages on my VM. I used filebeat 6.0.0 to ship data logstash going to elasticsearch. I just followed the steps on this link https://www.elastic.co/guide/en/beats/fileb…

---

## [How to update the template as once?](https://discuss.elastic.co/t/how-to-update-the-template-as-once/110082)

<div class="topic-metadata">

**Author:** [@zqc0512](https://discuss.elastic.co/u/zqc0512)\
**Replies:** 7\
**Last updated:** [December 5, 2017, 3:35am UTC](https://discuss.elastic.co/t/how-to-update-the-template-as-once/110082 "2017-12-05T03:35:41Z")

</div>

i use curl to put \_temlpate output error. curl -XPUT 'http://xx.xx.xx.xx:9200/\_template' -d '{ error is { "error": { "root\_cause": \[ { "type": "remote\_transport\_exception", "reason": "\[xxx.…

---

## [How to build a plugin to filter search results](https://discuss.elastic.co/t/how-to-build-a-plugin-to-filter-search-results/110236)

<div class="topic-metadata">

**Author:** [@sliu](https://discuss.elastic.co/u/sliu)\
**Replies:** 0\
**Last updated:** [December 5, 2017, 1:56am UTC](https://discuss.elastic.co/t/how-to-build-a-plugin-to-filter-search-results/110236 "2017-12-05T01:56:28Z")

</div>

How would I build a custom plugin to further trim search results? This would be at the stage after Elastic get all search results, before or right after query filters are applied. A pointer to some examples or tutorials …

---

## [ES shards allocation logic](https://discuss.elastic.co/t/es-shards-allocation-logic/110080)

<div class="topic-metadata">

**Author:** [@rwat090](https://discuss.elastic.co/u/rwat090)\
**Replies:** 2\
**Last updated:** [December 5, 2017, 1:24am UTC](https://discuss.elastic.co/t/es-shards-allocation-logic/110080 "2017-12-05T01:24:15Z")

</div>

Hi Everyone, Im just trying to get my head around the logic for shards node allocation, here are some examples Config ES: 5.6.4 Nodes: 2 Nodes are split between two datacenters Server 01 and Server 02 node.master r…

---

## [Why is Elastic's performance better with 1 data node than 2?](https://discuss.elastic.co/t/why-is-elastics-performance-better-with-1-data-node-than-2/110190)

<div class="topic-metadata">

**Author:** [@pinky.floyano](https://discuss.elastic.co/u/pinky.floyano)\
**Replies:** 1\
**Last updated:** [December 5, 2017, 1:02am UTC](https://discuss.elastic.co/t/why-is-elastics-performance-better-with-1-data-node-than-2/110190 "2017-12-05T01:02:29Z")

</div>

Greetings to all this community of Elastic, I have a great uncertainty which I hope to be able to solve with the help of your knowledge, and which I will explain later. Keep in mind that I'm doing this query because I've…

---

## [Image and document upload/download in Elasticsearch](https://discuss.elastic.co/t/image-and-document-upload-download-in-elasticsearch/110222)

<div class="topic-metadata">

**Author:** [@bradley](https://discuss.elastic.co/u/bradley)\
**Replies:** 2\
**Last updated:** [December 5, 2017, 12:26am UTC](https://discuss.elastic.co/t/image-and-document-upload-download-in-elasticsearch/110222 "2017-12-05T00:26:06Z")

</div>

I'm looking to build an app around Elasticsearch with image and file upload/download. So a user uploads an image or document (PDF, Word, etc.), the image gets stored, and retrieved later by users and admin. It looks like…

---

## [Using NEST - No Results](https://discuss.elastic.co/t/using-nest-no-results/106191)

<div class="topic-metadata">

**Author:** [@parsa](https://discuss.elastic.co/u/parsa)\
**Replies:** 18\
**Last updated:** [December 4, 2017, 10:26pm UTC](https://discuss.elastic.co/t/using-nest-no-results/106191 "2017-12-04T22:26:28Z")

</div>

This is my result of search by calling: http://localhost:9200/servers/server/\_search?q=servername:"server1-9" {"took":1233,"timed\_out":false,"\_shards":{"total":5,"successful":5,"skipped":0,"failed":0},"hits":{"total":1…

---

## [How to get a distinct list of keys of a dictionary field](https://discuss.elastic.co/t/how-to-get-a-distinct-list-of-keys-of-a-dictionary-field/110218)

<div class="topic-metadata">

**Author:** [@TaiVo](https://discuss.elastic.co/u/TaiVo)\
**Replies:** 0\
**Last updated:** [December 4, 2017, 10:11pm UTC](https://discuss.elastic.co/t/how-to-get-a-distinct-list-of-keys-of-a-dictionary-field/110218 "2017-12-04T22:11:40Z")

</div>

Hi, I have a field, which is a dictionary stored inside the \_source as follows: "dict\_field": { "key1": value, "key2": value, "key3": value, .... } I don't know all the possible keys, and I'd like to write an es q…

---

## [Network setup: Cluster: Why can't name self in list of hosts?](https://discuss.elastic.co/t/network-setup-cluster-why-cant-name-self-in-list-of-hosts/110206)

<div class="topic-metadata">

**Author:** [@Jose\_Ramierez](https://discuss.elastic.co/u/Jose_Ramierez)\
**Replies:** 3\
**Last updated:** [December 4, 2017, 9:55pm UTC](https://discuss.elastic.co/t/network-setup-cluster-why-cant-name-self-in-list-of-hosts/110206 "2017-12-04T21:55:30Z")

</div>

On 5.6.4 Why is it that I cannot list each nodes' OWN IP in: discovery.zen.ping.unicast.hosts: ? If I do this, (e.g. give every node in cluster same entry for "discovery.zen.ping.unicast.hosts: " ), then the cluster …

---

## [Indices.memory.index\_buffer\_size. documentation is ambiguous](https://discuss.elastic.co/t/indices-memory-index-buffer-size-documentation-is-ambiguous/110215)

<div class="topic-metadata">

**Author:** [@tumux](https://discuss.elastic.co/u/tumux)\
**Replies:** 0\
**Last updated:** [December 4, 2017, 9:38pm UTC](https://discuss.elastic.co/t/indices-memory-index-buffer-size-documentation-is-ambiguous/110215 "2017-12-04T21:38:12Z")

</div>

Continuing the discussion from Index\_buffer\_size vs max\_index\_buffer\_size: it says: "The min and max are taken into account only when index\_buffer\_size is a percentage. In that case the min and max may override index\_b…

---

## [How set up to listen on external IP AND localhost?](https://discuss.elastic.co/t/how-set-up-to-listen-on-external-ip-and-localhost/110207)

<div class="topic-metadata">

**Author:** [@Jose\_Ramierez](https://discuss.elastic.co/u/Jose_Ramierez)\
**Replies:** 1\
**Last updated:** [December 4, 2017, 9:25pm UTC](https://discuss.elastic.co/t/how-set-up-to-listen-on-external-ip-and-localhost/110207 "2017-12-04T21:25:06Z")

</div>

5.6.4 So it comes up stock on localhost. Fine. Then I set "network.host" in .config to the system IP, and now it no longer listens on localhost. This is a pita, because I can't run the same commands on all the cluste…

---

## [Sorting \_geo\_distance does not work for filter term](https://discuss.elastic.co/t/sorting-geo-distance-does-not-work-for-filter-term/110124)

<div class="topic-metadata">

**Author:** [@mate01988](https://discuss.elastic.co/u/mate01988)\
**Replies:** 4\
**Last updated:** [December 4, 2017, 5:48pm UTC](https://discuss.elastic.co/t/sorting-geo-distance-does-not-work-for-filter-term/110124 "2017-12-04T17:48:24Z")

</div>

Hello, I have a problem. Sorting by \_geo\_distance works for: \[query\] =\> Array( \[bool\] =\> Array ( \[must\] =\> Array …

---

## [Link mistake on offline X-Pack doc](https://discuss.elastic.co/t/link-mistake-on-offline-x-pack-doc/110182)

<div class="topic-metadata">

**Author:** [@mhgeay](https://discuss.elastic.co/u/mhgeay)\
**Replies:** 2\
**Last updated:** [December 4, 2017, 5:41pm UTC](https://discuss.elastic.co/t/link-mistake-on-offline-x-pack-doc/110182 "2017-12-04T17:41:16Z")

</div>

Hello support, FYI there is a mistake on the doc for offline X-Pack install on ES, KB, LS : https://www.elastic.co/guide/en/elasticsearch/reference/6.0/installing-xpack-es.html https://www.elastic.co/guide/en/kibana/6…

---

## [Non periodic spikes in indexing](https://discuss.elastic.co/t/non-periodic-spikes-in-indexing/109708)

<div class="topic-metadata">

**Author:** [@Yaroslav\_Molochko](https://discuss.elastic.co/u/Yaroslav_Molochko)\
**Replies:** 4\
**Last updated:** [December 4, 2017, 5:27pm UTC](https://discuss.elastic.co/t/non-periodic-spikes-in-indexing/109708 "2017-12-04T17:27:16Z")

</div>

We have a staging server with continuous indexing flow of around 40k req/sec. The cluster of 15 nodes can work for 2-12 hours, and then we see spikes in indexing, while there is no increase in incoming flow. \[devops-efk…

---

## [DocumentMissingException on bulk update](https://discuss.elastic.co/t/documentmissingexception-on-bulk-update/110186)

<div class="topic-metadata">

**Author:** [@matw](https://discuss.elastic.co/u/matw)\
**Replies:** 0\
**Last updated:** [December 4, 2017, 5:13pm UTC](https://discuss.elastic.co/t/documentmissingexception-on-bulk-update/110186 "2017-12-04T17:13:24Z")

</div>

On 2 identical installations of elastic search (5.6.1, single instance, 7 GB of HEAP, 16GB Memory, 8 core) i got a DocumentMissingException from time to time the setup is redis -\> logstash -\> elasticsearch recently, o…

---

## [No module named 'elasticsearch'](https://discuss.elastic.co/t/no-module-named-elasticsearch/110185)

<div class="topic-metadata">

**Author:** [@lengthy\_preamble](https://discuss.elastic.co/u/lengthy_preamble)\
**Replies:** 0\
**Last updated:** [December 4, 2017, 5:11pm UTC](https://discuss.elastic.co/t/no-module-named-elasticsearch/110185 "2017-12-04T17:11:08Z")

</div>

Hello all, I'm working with a cohort's python script, which calls on the elasticsearch module. However, when I run it in Jupyter, I get the following error: ImportError Traceback (most r…

---

## [Inverted way searching](https://discuss.elastic.co/t/inverted-way-searching/110184)

<div class="topic-metadata">

**Author:** [@Ahmed\_Zaki](https://discuss.elastic.co/u/Ahmed_Zaki)\
**Replies:** 0\
**Last updated:** [December 4, 2017, 5:05pm UTC](https://discuss.elastic.co/t/inverted-way-searching/110184 "2017-12-04T17:05:18Z")

</div>

I've indexed a product like this: product{ name: "abc", permissions : \[{ "path" : "x/y", "rights" : \[ "right1","right2" \] } } I need to get all the products having the user rights of the current user. For exam…

---

## [X-pack 6.0.0 sha1 missing](https://discuss.elastic.co/t/x-pack-6-0-0-sha1-missing/110179)

<div class="topic-metadata">

**Author:** [@kthxbayes](https://discuss.elastic.co/u/kthxbayes)\
**Replies:** 3\
**Last updated:** [December 4, 2017, 4:54pm UTC](https://discuss.elastic.co/t/x-pack-6-0-0-sha1-missing/110179 "2017-12-04T16:54:46Z")

</div>

Hi all, Hope this is the right place to raise this issue: The link to download the x-pack sha1 is currently broken. I am current getting a nosuchkey error. Link: https://artifacts.elastic.co/downloads/packs/x-pack/x-…

---

## [Accessing a field with white space](https://discuss.elastic.co/t/accessing-a-field-with-white-space/110134)

<div class="topic-metadata">

**Author:** [@dcam](https://discuss.elastic.co/u/dcam)\
**Replies:** 1\
**Last updated:** [December 4, 2017, 4:48pm UTC](https://discuss.elastic.co/t/accessing-a-field-with-white-space/110134 "2017-12-04T16:48:07Z")

</div>

In order to show the field prettier, I created with white space character: 'Error Message' I am not able to get it from watcher with mustache. {{error.hits.hits.0.\_source.'Error Message'}} {{error.hits.hits.0.fields.'…

---

## [Compound Indexes for User Based Data](https://discuss.elastic.co/t/compound-indexes-for-user-based-data/109887)

<div class="topic-metadata">

**Author:** [@Abhinav\_Tankha](https://discuss.elastic.co/u/Abhinav_Tankha)\
**Replies:** 3\
**Last updated:** [December 4, 2017, 4:45pm UTC](https://discuss.elastic.co/t/compound-indexes-for-user-based-data/109887 "2017-12-04T16:45:01Z")

</div>

For user-based-data for which the search query will always have some user reference(eg. user-id) and additional query params is there a way to maintain compound indexes in elasticsearch to reduce the search space. For o…

---

## [Anomaly detector Model is built based on?](https://discuss.elastic.co/t/anomaly-detector-model-is-built-based-on/110025)

<div class="topic-metadata">

**Author:** [@hym](https://discuss.elastic.co/u/hym)\
**Replies:** 1\
**Last updated:** [December 4, 2017, 4:29pm UTC](https://discuss.elastic.co/t/anomaly-detector-model-is-built-based-on/110025 "2017-12-04T16:29:02Z")

</div>

Hi, I recently started to play around with x-pack ML for anomaly detection. In first seen it seems when we specify a metric function as well as bucket-span, the statical model for anomaly detection should be built base…

---

## [No aggregation results unless more than half the shards are successful?](https://discuss.elastic.co/t/no-aggregation-results-unless-more-than-half-the-shards-are-successful/110129)

<div class="topic-metadata">

**Author:** [@Dominik\_Stadler](https://discuss.elastic.co/u/Dominik_Stadler)\
**Replies:** 3\
**Last updated:** [December 4, 2017, 4:28pm UTC](https://discuss.elastic.co/t/no-aggregation-results-unless-more-than-half-the-shards-are-successful/110129 "2017-12-04T16:28:54Z")

</div>

Hi, I just would like to confirm and find documentation/description about something that we noticed (and had to invest a bit of time to actually understand). We had a case where some indices had an incorrect mapping wh…

---

## [Elasticsearch docs GET vs POST question](https://discuss.elastic.co/t/elasticsearch-docs-get-vs-post-question/110176)

<div class="topic-metadata">

**Author:** [@arisbanach](https://discuss.elastic.co/u/arisbanach)\
**Replies:** 0\
**Last updated:** [December 4, 2017, 4:20pm UTC](https://discuss.elastic.co/t/elasticsearch-docs-get-vs-post-question/110176 "2017-12-04T16:20:21Z")

</div>

This docs page says The difference here is that instead of passing q=\* in the URI, we POST a JSON-style query request body to the \_search API. We’ll discuss this JSON query in the next section. below this example: G…

---

## [Elasticsearch 6.0 \_id and size\_in\_bytes](https://discuss.elastic.co/t/elasticsearch-6-0-id-and-size-in-bytes/110072)

<div class="topic-metadata">

**Author:** [@bCast](https://discuss.elastic.co/u/bCast)\
**Replies:** 3\
**Last updated:** [December 4, 2017, 4:19pm UTC](https://discuss.elastic.co/t/elasticsearch-6-0-id-and-size-in-bytes/110072 "2017-12-04T16:19:07Z")

</div>

I upgraded to 6.0 because of sequental ids. I expected that after switching to sequental \_id it will saves memory. In my case I have per day index with lots of events with small amount of fields (like ip\_src, ip\_dst, po…

---

## [Elasticsearch performance](https://discuss.elastic.co/t/elasticsearch-performance/110169)

<div class="topic-metadata">

**Author:** [@jmccormack](https://discuss.elastic.co/u/jmccormack)\
**Replies:** 0\
**Last updated:** [December 4, 2017, 3:54pm UTC](https://discuss.elastic.co/t/elasticsearch-performance/110169 "2017-12-04T15:54:08Z")

</div>

Hi All I am relativley new to Elastic and I am just looking for some advice please. I have a 3 node cluster with each having 8 cpu 16GB RAM 10 300GB 15k spinning disks I have a 6 daily indexes. All in the format of l…

---

## [Failed to execute \[org.elasticsearch.action.search.SearchRequest@31e1eed3\] lastShard \[true\]](https://discuss.elastic.co/t/failed-to-execute-org-elasticsearch-action-search-searchrequest-31e1eed3-lastshard-true/110156)

<div class="topic-metadata">

**Author:** [@yedukondalu](https://discuss.elastic.co/u/yedukondalu)\
**Replies:** 1\
**Last updated:** [December 4, 2017, 3:48pm UTC](https://discuss.elastic.co/t/failed-to-execute-org-elasticsearch-action-search-searchrequest-31e1eed3-lastshard-true/110156 "2017-12-04T15:48:14Z")

</div>

\[2017-12-04 14:04:48,600\]\[DEBUG\]\[action.search.type \] \[Morgan Le Fay\] \[cms-2017-w41\]\[0\], node\[b2Jk8MLcR9evD012hWulmg\], \[P\], s\[STARTED\]: Failed to execute \[org.elasticsearch.action.search.SearchRequest@5ff4c8aa\] las…

---

## [Nested object within nested object annotation question](https://discuss.elastic.co/t/nested-object-within-nested-object-annotation-question/110167)

<div class="topic-metadata">

**Author:** [@johntadd](https://discuss.elastic.co/u/johntadd)\
**Replies:** 0\
**Last updated:** [December 4, 2017, 3:37pm UTC](https://discuss.elastic.co/t/nested-object-within-nested-object-annotation-question/110167 "2017-12-04T15:37:21Z")

</div>

Following https://www.elastic.co/guide/en/elasticsearch/guide/current/nested-objects.html https://www.elastic.co/guide/en/elasticsearch/guide/current/nested-mapping.html I create an index with nested object enabled. N…

---

## [Varying schema problem](https://discuss.elastic.co/t/varying-schema-problem/109969)

<div class="topic-metadata">

**Author:** [@johntadd](https://discuss.elastic.co/u/johntadd)\
**Replies:** 2\
**Last updated:** [December 4, 2017, 3:10pm UTC](https://discuss.elastic.co/t/varying-schema-problem/109969 "2017-12-04T15:10:46Z")

</div>

I have a tons of complicated xml files I want to transform to json, then pushing to elasticsearch. When pushing to elastichsearch it throws some exceptions such as number format Caused by: java.lang.NumberFormatExcepti…

---

## [Multi\_match:best\_fields with complex queries no dis\_max](https://discuss.elastic.co/t/multi-match-best-fields-with-complex-queries-no-dis-max/110121)

<div class="topic-metadata">

**Author:** [@Jose\_Victor\_da\_Silva](https://discuss.elastic.co/u/Jose_Victor_da_Silva)\
**Replies:** 1\
**Last updated:** [December 4, 2017, 1:47pm UTC](https://discuss.elastic.co/t/multi-match-best-fields-with-complex-queries-no-dis-max/110121 "2017-12-04T13:47:34Z")

</div>

Is there any way to use the multi\_match interface using these more complex matchs? Obs: I believe that multi\_match: best\_fields works as if it were an alias pro dis\_max in this situation mentioned I am trying to use mu…

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

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