# Elasticsearch

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

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

**Page:** 1819

---

## [Save elasticsearch document field value in java variable](https://discuss.elastic.co/t/save-elasticsearch-document-field-value-in-java-variable/116227)

<div class="topic-metadata">

**Author:** [@devil\_srj7](https://discuss.elastic.co/u/devil_srj7)\
**Replies:** 17\
**Last updated:** [January 23, 2018, 11:12am UTC](https://discuss.elastic.co/t/save-elasticsearch-document-field-value-in-java-variable/116227 "2018-01-23T11:12:06Z")

</div>

How can I save the the field value in a variable in Java. { "took": 6, "timed\_out": false, "\_shards": { "total": 10, "successful": 10, "skipped": 0, "failed": 0 }, "hits": { "total": 177643…

---

## [Calculate k Nearest Neighbours using Cosine Similarity](https://discuss.elastic.co/t/calculate-k-nearest-neighbours-using-cosine-similarity/116647)

<div class="topic-metadata">

**Author:** [@Vaibhav\_Rathi](https://discuss.elastic.co/u/Vaibhav_Rathi)\
**Replies:** 0\
**Last updated:** [January 23, 2018, 10:35am UTC](https://discuss.elastic.co/t/calculate-k-nearest-neighbours-using-cosine-similarity/116647 "2018-01-23T10:35:58Z")

</div>

Hi, I am trying to calculate the K Nearest Neighbours of a Vector at querytime. I have structured my data as Follows: { "vector": \[ 0, 0, 0, 0.3004656841866144, 0.028906494022773094, 0, 0.001937984496124031, …

---

## [How to upgrade data from elasticsearch 2.4 to 5.6](https://discuss.elastic.co/t/how-to-upgrade-data-from-elasticsearch-2-4-to-5-6/116619)

<div class="topic-metadata">

**Author:** [@Sharon\_wsf](https://discuss.elastic.co/u/Sharon_wsf)\
**Replies:** 3\
**Last updated:** [January 23, 2018, 10:04am UTC](https://discuss.elastic.co/t/how-to-upgrade-data-from-elasticsearch-2-4-to-5-6/116619 "2018-01-23T10:04:49Z")

</div>

hi team, how to upgrade elasticsearch from 2.4 to 5.6? i have read https://www.elastic.co/guide/en/elasticsearch/reference/5.6/rolling-upgrades.html but what step actually i need to do? this is not very clear. i alre…

---

## [\[script\] query does not support \[params\]](https://discuss.elastic.co/t/script-query-does-not-support-params/116631)

<div class="topic-metadata">

**Author:** [@lbrutti](https://discuss.elastic.co/u/lbrutti)\
**Replies:** 3\
**Last updated:** [January 23, 2018, 9:55am UTC](https://discuss.elastic.co/t/script-query-does-not-support-params/116631 "2018-01-23T09:55:37Z")

</div>

Hello, I'm trying to perform a scripted query: { "query": { "bool": { "must": \[ { "script": { "script": "doc\['@timestamp'\].value.hourOfDay \>= params.startHour && doc\['@timestam…

---

## [Cluster down - No action possible](https://discuss.elastic.co/t/cluster-down-no-action-possible/116617)

<div class="topic-metadata">

**Author:** [@david1980](https://discuss.elastic.co/u/david1980)\
**Replies:** 5\
**Last updated:** [January 23, 2018, 9:50am UTC](https://discuss.elastic.co/t/cluster-down-no-action-possible/116617 "2018-01-23T09:50:42Z")

</div>

Hello, {"error":{"root\_cause":\[{"type":"circuit\_breaking\_exception","reason":"\[parent\] Data too large, data for \[\<http\_request\>\] would be \[1740972440/1.6gb\], which is larger than the limit of \[1491035750/1.3gb\]","bytes\_…

---

## [Elasticsearch crashes ubuntu vm](https://discuss.elastic.co/t/elasticsearch-crashes-ubuntu-vm/116474)

<div class="topic-metadata">

**Author:** [@babayotakun](https://discuss.elastic.co/u/babayotakun)\
**Replies:** 7\
**Last updated:** [January 23, 2018, 9:27am UTC](https://discuss.elastic.co/t/elasticsearch-crashes-ubuntu-vm/116474 "2018-01-23T09:27:59Z")

</div>

We have two VMware VMs with Ubuntu 16.4 x64 on them. Each one has 2gb of memory and 1 cpu core. We have installed elasticsearch (5.1.2) on every vm as systemd service. All properties are default, except of xmx and xms (…

---

## [Find range of ID numbers](https://discuss.elastic.co/t/find-range-of-id-numbers/116618)

<div class="topic-metadata">

**Author:** [@Aleksander\_de](https://discuss.elastic.co/u/Aleksander_de)\
**Replies:** 0\
**Last updated:** [January 23, 2018, 8:53am UTC](https://discuss.elastic.co/t/find-range-of-id-numbers/116618 "2018-01-23T08:53:28Z")

</div>

Do you know the way to find the range of document's unique id numbers when they are displayed as a string? I am Using ELK stack version 5.2

---

## [Problem when indexing nested object (Elasticsearch 5.6)](https://discuss.elastic.co/t/problem-when-indexing-nested-object-elasticsearch-5-6/116177)

<div class="topic-metadata">

**Author:** [@Phongsatorn.P](https://discuss.elastic.co/u/Phongsatorn.P)\
**Replies:** 19\
**Last updated:** [January 23, 2018, 8:01am UTC](https://discuss.elastic.co/t/problem-when-indexing-nested-object-elasticsearch-5-6/116177 "2018-01-23T08:01:48Z")

</div>

Hi there, I have some problem when i want to index (by using cURL) nested object , assume i have to indices (restaurant\_info and restaurant\_payment) both two indices have nested object. But problem that occured was nest…

---

## [Parent Child not working with Elastic 6.1.1](https://discuss.elastic.co/t/parent-child-not-working-with-elastic-6-1-1/116586)

<div class="topic-metadata">

**Author:** [@rtempalli](https://discuss.elastic.co/u/rtempalli)\
**Replies:** 1\
**Last updated:** [January 23, 2018, 7:15am UTC](https://discuss.elastic.co/t/parent-child-not-working-with-elastic-6-1-1/116586 "2018-01-23T07:15:12Z")

</div>

Hi I have followed instructions from here: P/C on Elastic P/C doesn't seem to work with Elastic 6.1.1, however, it worked with 5.4.0 Did I miss anything or was this feature removed from the newer releases? My first p…

---

## [What is best to store data and logs?](https://discuss.elastic.co/t/what-is-best-to-store-data-and-logs/116589)

<div class="topic-metadata">

**Author:** [@Dilip\_Kumar](https://discuss.elastic.co/u/Dilip_Kumar)\
**Replies:** 1\
**Last updated:** [January 23, 2018, 6:46am UTC](https://discuss.elastic.co/t/what-is-best-to-store-data-and-logs/116589 "2018-01-23T06:46:02Z")

</div>

Hi, when moving on production whether i should use NFS for logs data and es data is any drawback to use NFS, if i having 16 gb ram with 1 TB disk space on both. Please suggest important point for production. Thanks

---

## [ELK Limits, config tips, high CPU usage, cluster (newbie)](https://discuss.elastic.co/t/elk-limits-config-tips-high-cpu-usage-cluster-newbie/116410)

<div class="topic-metadata">

**Author:** [@Sylvain-69](https://discuss.elastic.co/u/Sylvain-69)\
**Replies:** 4\
**Last updated:** [January 23, 2018, 5:07am UTC](https://discuss.elastic.co/t/elk-limits-config-tips-high-cpu-usage-cluster-newbie/116410 "2018-01-23T05:07:42Z")

</div>

Hello Everybody ! I started to use ELK in my company, at first to be able to get a look at windows logon informations then members of security groups activity, etc... I installed one node on Centos 7 (VM) with 2 CPUs (…

---

## [ElasticSearch 3 node fail over not working](https://discuss.elastic.co/t/elasticsearch-3-node-fail-over-not-working/114952)

<div class="topic-metadata">

**Author:** [@qamarjrk](https://discuss.elastic.co/u/qamarjrk)\
**Replies:** 17\
**Last updated:** [January 23, 2018, 4:27am UTC](https://discuss.elastic.co/t/elasticsearch-3-node-fail-over-not-working/114952 "2018-01-23T04:27:56Z")

</div>

I have 3 node and config setup as shown below in all 3 es server. If anyone has similar fail over issue, please let me how did you resolved. I am implementing first time in Oracle PeopleSoft application. elasticsearch.y…

---

## [Better way to do a wildacard search - prefix wildcard or match\_phrase\_prefix?](https://discuss.elastic.co/t/better-way-to-do-a-wildacard-search-prefix-wildcard-or-match-phrase-prefix/116524)

<div class="topic-metadata">

**Author:** [@dimalini](https://discuss.elastic.co/u/dimalini)\
**Replies:** 4\
**Last updated:** [January 23, 2018, 4:25am UTC](https://discuss.elastic.co/t/better-way-to-do-a-wildacard-search-prefix-wildcard-or-match-phrase-prefix/116524 "2018-01-23T04:25:37Z")

</div>

Hi, We have a scenario where we need to support queries like "\*foo", "\*abc" etc(calling them prefix wildcard). And doing a wildcard search like below, had a great impact on the available memory and impacted the search …

---

## [Storage limit and retrieval size](https://discuss.elastic.co/t/storage-limit-and-retrieval-size/116579)

<div class="topic-metadata">

**Author:** [@aneesh](https://discuss.elastic.co/u/aneesh)\
**Replies:** 1\
**Last updated:** [January 23, 2018, 4:08am UTC](https://discuss.elastic.co/t/storage-limit-and-retrieval-size/116579 "2018-01-23T04:08:36Z")

</div>

Hi I have a scenario where need to store from 10 to more than 100000 records in a single index and use like a cache provider too. In search I need to retrieve from 20 to 10000 records. What will be the best way to imp…

---

## [ES awareness zones/racks](https://discuss.elastic.co/t/es-awareness-zones-racks/116578)

<div class="topic-metadata">

**Author:** [@Edmund\_Cheng](https://discuss.elastic.co/u/Edmund_Cheng)\
**Replies:** 0\
**Last updated:** [January 23, 2018, 3:42am UTC](https://discuss.elastic.co/t/es-awareness-zones-racks/116578 "2018-01-23T03:42:09Z")

</div>

Hi, i was reading through cluster awareness link: https://www.elastic.co/guide/en/elasticsearch/reference/2.4/allocation-awareness.html And I am not sure what is the difference between this: e.g node.rack\_id: ra…

---

## [Alternative to Curator to cleanup old indices](https://discuss.elastic.co/t/alternative-to-curator-to-cleanup-old-indices/116447)

<div class="topic-metadata">

**Author:** [@elasticdude](https://discuss.elastic.co/u/elasticdude)\
**Replies:** 5\
**Last updated:** [January 23, 2018, 1:15am UTC](https://discuss.elastic.co/t/alternative-to-curator-to-cleanup-old-indices/116447 "2018-01-23T01:15:04Z")

</div>

What are my options if I want to delete old indices programmatically? There is delete index API but I have to generate the index names manually. I'm wondering if there any API which I can use to delete indices without …

---

## [I am attempting to pull information from a Watcher query payload to place in an email and I am getting a "index out of bounds exception"](https://discuss.elastic.co/t/i-am-attempting-to-pull-information-from-a-watcher-query-payload-to-place-in-an-email-and-i-am-getting-a-index-out-of-bounds-exception/116540)

<div class="topic-metadata">

**Author:** [@Abshier\_c](https://discuss.elastic.co/u/Abshier_c)\
**Replies:** 2\
**Last updated:** [January 22, 2018, 10:03pm UTC](https://discuss.elastic.co/t/i-am-attempting-to-pull-information-from-a-watcher-query-payload-to-place-in-an-email-and-i-am-getting-a-index-out-of-bounds-exception/116540 "2018-01-22T22:03:51Z")

</div>

Here is my query and action: { "trigger": { "schedule": { "interval": "1m" } }, "input": { "search": { "request": { "search\_type": "query\_then\_fetch", "indices": \[ "winlogbeat-\*" \], "types": \[\], "body": { …

---

## [Keystore.password deprecated](https://discuss.elastic.co/t/keystore-password-deprecated/116533)

<div class="topic-metadata">

**Author:** [@DaveyDevOps](https://discuss.elastic.co/u/DaveyDevOps)\
**Replies:** 1\
**Last updated:** [January 22, 2018, 9:19pm UTC](https://discuss.elastic.co/t/keystore-password-deprecated/116533 "2018-01-22T21:19:41Z")

</div>

ES 6.x See this in the logs \[keystore.password\] setting was deprecated in Elasticsearch and will be removed in a future release! Have searched the breaking changes and did not find any details. I did come across htt…

---

## [Distributing primary shards evenly for read primary\_first performance](https://discuss.elastic.co/t/distributing-primary-shards-evenly-for-read-primary-first-performance/115613)

<div class="topic-metadata">

**Author:** [@spencer.ho](https://discuss.elastic.co/u/spencer.ho)\
**Replies:** 4\
**Last updated:** [January 22, 2018, 6:57pm UTC](https://discuss.elastic.co/t/distributing-primary-shards-evenly-for-read-primary-first-performance/115613 "2018-01-22T18:57:19Z")

</div>

The prior discussion on distributing primary shards were more on performance and rebalance. If the primary shards are not evenly distributed to all data nodes in the cluster, more load is on nodes with primary shards …

---

## [Filter based on queries saved in an index](https://discuss.elastic.co/t/filter-based-on-queries-saved-in-an-index/116530)

<div class="topic-metadata">

**Author:** [@xredx](https://discuss.elastic.co/u/xredx)\
**Replies:** 0\
**Last updated:** [January 22, 2018, 8:24pm UTC](https://discuss.elastic.co/t/filter-based-on-queries-saved-in-an-index/116530 "2018-01-22T20:24:17Z")

</div>

So, I am currently running a Network Operations Center largely based around the ELK stack. To help track and identify aberrant events, I’d like to create an index with documents containing saved query strings, a timestam…

---

## [Recovery process of elasticsearch](https://discuss.elastic.co/t/recovery-process-of-elasticsearch/116526)

<div class="topic-metadata">

**Author:** [@fhalde](https://discuss.elastic.co/u/fhalde)\
**Replies:** 0\
**Last updated:** [January 22, 2018, 7:27pm UTC](https://discuss.elastic.co/t/recovery-process-of-elasticsearch/116526 "2018-01-22T19:27:10Z")

</div>

Can someone explain how the recovery steps of elasticsearch works? e.g. when a node comes back up, shards get initialized. I see in cat recovery files files\_percent & translog and translog\_percent translog recovery mak…

---

## [How to make timeline from Hadoop data?](https://discuss.elastic.co/t/how-to-make-timeline-from-hadoop-data/116390)

<div class="topic-metadata">

**Author:** [@BicaLuv](https://discuss.elastic.co/u/BicaLuv)\
**Replies:** 4\
**Last updated:** [January 22, 2018, 5:46am UTC](https://discuss.elastic.co/t/how-to-make-timeline-from-hadoop-data/116390 "2018-01-22T05:46:34Z")

</div>

Hello! I'm currently using Elasticsearch Hadoop from my Spark Structured Streaming job which generates data having the following schema: root |-- id: string (nullable = true) |-- eventTime: timestamp (nullable = true…

---

## [Painless: access params.\_source in script filter in 6.1](https://discuss.elastic.co/t/painless-access-params-source-in-script-filter-in-6-1/115449)

<div class="topic-metadata">

**Author:** [@mahtuag](https://discuss.elastic.co/u/mahtuag)\
**Replies:** 4\
**Last updated:** [January 22, 2018, 5:22pm UTC](https://discuss.elastic.co/t/painless-access-params-source-in-script-filter-in-6-1/115449 "2018-01-22T17:22:07Z")

</div>

Within painless scripts I use for script queries (in a filter context), sort scripts and script fields, I need to refer to the JSON structure of the source document, which is fairly complex and has several arrays of obje…

---

## [Add an external jar to gradle](https://discuss.elastic.co/t/add-an-external-jar-to-gradle/114112)

<div class="topic-metadata">

**Author:** [@uderline](https://discuss.elastic.co/u/uderline)\
**Replies:** 3\
**Last updated:** [January 22, 2018, 4:52pm UTC](https://discuss.elastic.co/t/add-an-external-jar-to-gradle/114112 "2018-01-22T16:52:04Z")

</div>

Hello, I'm developing a plugin and I would like to add an external jar dependency to my project. The gradle documentation says to do it this way: dependencies { compile files("./libs/foo.jar") } When I added my j…

---

## [Case Sensitive query?](https://discuss.elastic.co/t/case-sensitive-query/116504)

<div class="topic-metadata">

**Author:** [@Derrick](https://discuss.elastic.co/u/Derrick)\
**Replies:** 3\
**Last updated:** [January 22, 2018, 4:46pm UTC](https://discuss.elastic.co/t/case-sensitive-query/116504 "2018-01-22T16:46:05Z")

</div>

Hi, I have an issue with query, I want the search case insensitive, but I don't know what's wrong with my mapping file? the below query returns result properly. { "query": { "bool": { "must": \[ { …

---

## [Genre Expansion in Elasticsearch 6.1](https://discuss.elastic.co/t/genre-expansion-in-elasticsearch-6-1/115710)

<div class="topic-metadata">

**Author:** [@acorned](https://discuss.elastic.co/u/acorned)\
**Replies:** 4\
**Last updated:** [January 22, 2018, 2:38pm UTC](https://discuss.elastic.co/t/genre-expansion-in-elasticsearch-6-1/115710 "2018-01-22T14:38:17Z")

</div>

Hello All! I need some hierarchical structure of synonyms to search, as it described here: https://www.elastic.co/guide/en/elasticsearch/guide/current/synonyms-expand-or-contract.html When I search for "pet" I want to…

---

## [Document Retreive](https://discuss.elastic.co/t/document-retreive/116479)

<div class="topic-metadata">

**Author:** [@devil\_srj7](https://discuss.elastic.co/u/devil_srj7)\
**Replies:** 5\
**Last updated:** [January 22, 2018, 2:12pm UTC](https://discuss.elastic.co/t/document-retreive/116479 "2018-01-22T14:12:24Z")

</div>

I have two indices index A index B both the indices has different information but each index has a field named "employee\_id" I need to retrieve all information of a employee with id 1 from both the indices. Since …

---

## [Connecting kibana with elasticsearch](https://discuss.elastic.co/t/connecting-kibana-with-elasticsearch/116285)

<div class="topic-metadata">

**Author:** [@Nada\_I](https://discuss.elastic.co/u/Nada_I)\
**Replies:** 13\
**Last updated:** [January 22, 2018, 1:09pm UTC](https://discuss.elastic.co/t/connecting-kibana-with-elasticsearch/116285 "2018-01-22T13:09:27Z")

</div>

hello, i want to monitor the network in elasticsearch cloud so i have 2 questions: 1- how i can enter data and send it to the cluster to monitor it from kibana 2-which software i should install x-pack,elasticsearch a…

---

## [Divide Data and fire query in elasticsearch](https://discuss.elastic.co/t/divide-data-and-fire-query-in-elasticsearch/116231)

<div class="topic-metadata">

**Author:** [@Devanshu\_Sharma](https://discuss.elastic.co/u/Devanshu_Sharma)\
**Replies:** 3\
**Last updated:** [January 22, 2018, 12:53pm UTC](https://discuss.elastic.co/t/divide-data-and-fire-query-in-elasticsearch/116231 "2018-01-22T12:53:39Z")

</div>

HI, I have to two index name is index1 or index2. Both one index1 or index2 have 1000000(10 lac.) data. I want to divide 100000(1 lac.) any one index data and apply query index1 column1 or index2 column2 both to merge…

---

## [Filtering for two chars strings on keyword field does not work?](https://discuss.elastic.co/t/filtering-for-two-chars-strings-on-keyword-field-does-not-work/116409)

<div class="topic-metadata">

**Author:** [@ste2c](https://discuss.elastic.co/u/ste2c)\
**Replies:** 3\
**Last updated:** [January 22, 2018, 12:44pm UTC](https://discuss.elastic.co/t/filtering-for-two-chars-strings-on-keyword-field-does-not-work/116409 "2018-01-22T12:44:07Z")

</div>

Hi all, I cannot understand how to filter for two chars strings a simple keyword field. I created the field like this: "tags": { "store": True, "type": "keyword" }, ..the "tags" field is then populated with a lis…

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

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