# Elasticsearch

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

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

**Page:** 1173

---

## [Counting total hits with java always retrieve 0](https://discuss.elastic.co/t/counting-total-hits-with-java-always-retrieve-0/197633)

<div class="topic-metadata">

**Author:** [@lsdany](https://discuss.elastic.co/u/lsdany)\
**Replies:** 1\
**Last updated:** [September 2, 2019, 8:22am UTC](https://discuss.elastic.co/t/counting-total-hits-with-java-always-retrieve-0/197633 "2019-09-02T08:22:51Z")

</div>

Hi, I'm using ES 6.4 with java, and I need to get the total hits from a query, but when I do that always retrieve 0 hits. This is how I retrieve hits. SearchResponse response = restHighLevelClient.search(searchReque…

---

## [How do i delete child docs in my parent-child relationship automatically in elasticsearch after a particular interval is finished](https://discuss.elastic.co/t/how-do-i-delete-child-docs-in-my-parent-child-relationship-automatically-in-elasticsearch-after-a-particular-interval-is-finished/197645)

<div class="topic-metadata">

**Author:** [@yash.tandon](https://discuss.elastic.co/u/yash.tandon)\
**Replies:** 12\
**Last updated:** [September 2, 2019, 7:04am UTC](https://discuss.elastic.co/t/how-do-i-delete-child-docs-in-my-parent-child-relationship-automatically-in-elasticsearch-after-a-particular-interval-is-finished/197645 "2019-09-02T07:04:56Z")

</div>

link: https://stackoverflow.com/q/57704269/11432290 Can someone help me with this as i wanted to delete my child docs in my parent child relationship as described above in the link. Your guidance will be highly apprecia…

---

## [Elasticsearch is still initializing the kibana index. Too many shards maybe?](https://discuss.elastic.co/t/elasticsearch-is-still-initializing-the-kibana-index-too-many-shards-maybe/197639)

<div class="topic-metadata">

**Author:** [@huon](https://discuss.elastic.co/u/huon)\
**Replies:** 2\
**Last updated:** [September 2, 2019, 6:32am UTC](https://discuss.elastic.co/t/elasticsearch-is-still-initializing-the-kibana-index-too-many-shards-maybe/197639 "2019-09-02T06:32:42Z")

</div>

Hi all! I have inherited a simple Elasticsearch + Kibana set up, and I have no prior experience with either. I am getting the error in the title: In my elasticsearch log I am getting lots of this: \[2019-09-02T01:46…

---

## [ES Upgrade from 5.6 to 6.8](https://discuss.elastic.co/t/es-upgrade-from-5-6-to-6-8/196873)

<div class="topic-metadata">

**Author:** [@Indu\_Nallithodi](https://discuss.elastic.co/u/Indu_Nallithodi)\
**Replies:** 5\
**Last updated:** [September 2, 2019, 5:02am UTC](https://discuss.elastic.co/t/es-upgrade-from-5-6-to-6-8/196873 "2019-09-02T05:02:40Z")

</div>

After upgrade to 6.8.0 as rolling upgrade:partial update is giving Validation exception /\_update?refresh=true {"error":{"root\_cause":\[{"type":"remote\_transport\_exception","reason":"\[node-02\]\[:9300\]\[indices:data/write/u…

---

## [Calculating the hit counts as a bytes in kibana](https://discuss.elastic.co/t/calculating-the-hit-counts-as-a-bytes-in-kibana/197642)

<div class="topic-metadata">

**Author:** [@shwesinhan](https://discuss.elastic.co/u/shwesinhan)\
**Replies:** 0\
**Last updated:** [September 2, 2019, 3:58am UTC](https://discuss.elastic.co/t/calculating-the-hit-counts-as-a-bytes-in-kibana/197642 "2019-09-02T03:58:16Z")

</div>

Hi there I would like to check size (bytes) of particular fields in kibana. Is there any query to do that?

---

## [Count the number of occurence of my keywords from all the retrieved documents](https://discuss.elastic.co/t/count-the-number-of-occurence-of-my-keywords-from-all-the-retrieved-documents/197452)

<div class="topic-metadata">

**Author:** [@Noctis17](https://discuss.elastic.co/u/Noctis17)\
**Replies:** 0\
**Last updated:** [August 30, 2019, 7:01am UTC](https://discuss.elastic.co/t/count-the-number-of-occurence-of-my-keywords-from-all-the-retrieved-documents/197452 "2019-08-30T07:01:14Z")

</div>

My original post: Applications I'm using: Elasticsearch: v7.1 PHP: v7.2 Laravel: v5.8 Elasticsearch/elasticsearch, official API of Elasticsearch to PHP Hello and good day! Is it possible to do an Elasticsearch q…

---

## [ELK Container Restores Old Index](https://discuss.elastic.co/t/elk-container-restores-old-index/196446)

<div class="topic-metadata">

**Author:** [@VicXue](https://discuss.elastic.co/u/VicXue)\
**Replies:** 2\
**Last updated:** [September 1, 2019, 9:56pm UTC](https://discuss.elastic.co/t/elk-container-restores-old-index/196446 "2019-09-01T21:56:22Z")

</div>

I'm currently using this docker container (v7.2.1 source) to monitor my dockerized .Net Core 2.1 API. My API has the Serilog.Elasticsearch.Sink installed in order to communicate with the ELK container. I ran these two co…

---

## [Elasticsearch and Client Version to choose](https://discuss.elastic.co/t/elasticsearch-and-client-version-to-choose/197626)

<div class="topic-metadata">

**Author:** [@mrjayarajj](https://discuss.elastic.co/u/mrjayarajj)\
**Replies:** 1\
**Last updated:** [September 1, 2019, 5:52pm UTC](https://discuss.elastic.co/t/elasticsearch-and-client-version-to-choose/197626 "2019-09-01T17:52:10Z")

</div>

We are planning to implement elastic search for our project , need expert comment on the following which elasticsearch version to choose ? is 7.3.1 stable ? or is it better to go to two level lower version, say 7.0.1 ? …

---

## [Autogenerated IDs settings](https://discuss.elastic.co/t/autogenerated-ids-settings/197607)

<div class="topic-metadata">

**Author:** [@Mohamad-Sobhie](https://discuss.elastic.co/u/Mohamad-Sobhie)\
**Replies:** 1\
**Last updated:** [August 31, 2019, 7:39pm UTC](https://discuss.elastic.co/t/autogenerated-ids-settings/197607 "2019-08-31T19:39:57Z")

</div>

Is there a way to edit the settings of the autogenerated Ids in Elasticsearch, like the length of it, specific syntax etc? and is it possible to make Elasticsearch generate all ids even if some documents have the id set …

---

## [Problem restarting cluster on 6.6.1](https://discuss.elastic.co/t/problem-restarting-cluster-on-6-6-1/194200)

<div class="topic-metadata">

**Author:** [@punppis](https://discuss.elastic.co/u/punppis)\
**Replies:** 2\
**Last updated:** [August 31, 2019, 10:51am UTC](https://discuss.elastic.co/t/problem-restarting-cluster-on-6-6-1/194200 "2019-08-31T10:51:36Z")

</div>

Elasticsearch 6.6.1 I have a 3-node cluster. 2 master+data, 1 data only. Our setup has been running ok for few months until I have to restart them for any reason. The problem is that I have to restart the machines in s…

---

## [Триггеры как в SQL](https://discuss.elastic.co/t/sql/197585)

<div class="topic-metadata">

**Author:** [@korableg](https://discuss.elastic.co/u/korableg)\
**Replies:** 2\
**Last updated:** [August 31, 2019, 10:41am UTC](https://discuss.elastic.co/t/sql/197585 "2019-08-31T10:41:11Z")

</div>

Добрый день! Мне необходимо реализовать запись в одном индексе при записи в другом, существует ли такой механизм? Например как триггеры в SQL.

---

## [Orphan Data Node](https://discuss.elastic.co/t/orphan-data-node/197463)

<div class="topic-metadata">

**Author:** [@Erik\_Jonsson\_Thoren](https://discuss.elastic.co/u/Erik_Jonsson_Thoren)\
**Replies:** 2\
**Last updated:** [August 31, 2019, 6:06am UTC](https://discuss.elastic.co/t/orphan-data-node/197463 "2019-08-31T06:06:10Z")

</div>

Hi, We lost our master-nodes in our cluster due to a faulty deployment process, and now our data-nodes cant join the new master nodes due to cluster id mismatch. If we want no data-loss, what are our options?

---

## [Calculating Number of Data nodes](https://discuss.elastic.co/t/calculating-number-of-data-nodes/197545)

<div class="topic-metadata">

**Author:** [@Nikhil04](https://discuss.elastic.co/u/Nikhil04)\
**Replies:** 4\
**Last updated:** [August 31, 2019, 5:55am UTC](https://discuss.elastic.co/t/calculating-number-of-data-nodes/197545 "2019-08-31T05:55:00Z")

</div>

Hi, I was going through one of the webinars by elastic.In the webinar,I came across a formula to calculate data nodes as below: Data Nodes: ROUNDUP(Total Storage(GB) / Memory per data node / Memory:data ratio) + 1 Data…

---

## [Elasticsearch如何进行跨库查询](https://discuss.elastic.co/t/elasticsearch/197446)

<div class="topic-metadata">

**Author:** [@wwl1](https://discuss.elastic.co/u/wwl1)\
**Replies:** 1\
**Last updated:** [August 31, 2019, 5:53am UTC](https://discuss.elastic.co/t/elasticsearch/197446 "2019-08-31T05:53:53Z")

</div>

在elasticsearch中如何才能进行跨库查询，希望大佬们能指点迷津，谢谢。

---

## [ScrollAll Timeout](https://discuss.elastic.co/t/scrollall-timeout/196418)

<div class="topic-metadata">

**Author:** [@bo.clifton](https://discuss.elastic.co/u/bo.clifton)\
**Replies:** 6\
**Last updated:** [August 30, 2019, 10:25pm UTC](https://discuss.elastic.co/t/scrollall-timeout/196418 "2019-08-30T22:25:44Z")

</div>

I'm running into timeouts using ScrollAll. Code is below. I have a large index (160mil items in this index) and need to be planning for substantially larger indices. We will routinely need to perform a scroll search t…

---

## [Elastic.elasticsearch template in azure marketplace is giving error while deploying custom scripts](https://discuss.elastic.co/t/elastic-elasticsearch-template-in-azure-marketplace-is-giving-error-while-deploying-custom-scripts/197284)

<div class="topic-metadata">

**Author:** [@BasavarajKambali](https://discuss.elastic.co/u/BasavarajKambali)\
**Replies:** 1\
**Last updated:** [August 30, 2019, 10:18pm UTC](https://discuss.elastic.co/t/elastic-elasticsearch-template-in-azure-marketplace-is-giving-error-while-deploying-custom-scripts/197284 "2019-08-30T22:18:24Z")

</div>

Created all VMs and infra part of the template after creating VMs failing at Datanode/custom scripts exicution. { "id": "/subscriptions/425d7347-3ff5-4474-be64-653fa/resourceGroups/AZRDEVLOGSTASH-RG/providers/Microsoft.…

---

## [Index sorting in rollover request not supported?](https://discuss.elastic.co/t/index-sorting-in-rollover-request-not-supported/197430)

<div class="topic-metadata">

**Author:** [@linkerc](https://discuss.elastic.co/u/linkerc)\
**Replies:** 5\
**Last updated:** [August 30, 2019, 9:43pm UTC](https://discuss.elastic.co/t/index-sorting-in-rollover-request-not-supported/197430 "2019-08-30T21:43:20Z")

</div>

ES 7.3.0 I'm trying to issue rollover command with index sorting. But I'm getting status 400 with "reason": "unknown index sort field:\[ts\]" This is my payload: POST test/\_rollover { "conditions": { "max\_size"…

---

## [Segments.fixed\_bitset\_memory Explosion While Deleting 300 million Docs](https://discuss.elastic.co/t/segments-fixed-bitset-memory-explosion-while-deleting-300-million-docs/197553)

<div class="topic-metadata">

**Author:** [@mstruve](https://discuss.elastic.co/u/mstruve)\
**Replies:** 0\
**Last updated:** [August 30, 2019, 4:34pm UTC](https://discuss.elastic.co/t/segments-fixed-bitset-memory-explosion-while-deleting-300-million-docs/197553 "2019-08-30T16:34:48Z")

</div>

Using Elasticsearch 5.6 Recently we did some cleanup on one of our indexes and removed 300 million docs from a total of about 2 billion. While removing the docs using delete\_by\_query our index memory exploded along with…

---

## [\_forcemerge multithreading / performance?](https://discuss.elastic.co/t/forcemerge-multithreading-performance/197573)

<div class="topic-metadata">

**Author:** [@jeroen1](https://discuss.elastic.co/u/jeroen1)\
**Replies:** 0\
**Last updated:** [August 30, 2019, 7:01pm UTC](https://discuss.elastic.co/t/forcemerge-multithreading-performance/197573 "2019-08-30T19:01:23Z")

</div>

I mentioned that \_forcemerge uses only a single core. Is there an options to use multiple cores? If not: any tips of tricks to exploit massive core count for a \_forcemerge?

---

## [High Memory buffer/cache Kubernetes](https://discuss.elastic.co/t/high-memory-buffer-cache-kubernetes/197569)

<div class="topic-metadata">

**Author:** [@beyond](https://discuss.elastic.co/u/beyond)\
**Replies:** 0\
**Last updated:** [August 30, 2019, 6:50pm UTC](https://discuss.elastic.co/t/high-memory-buffer-cache-kubernetes/197569 "2019-08-30T18:50:23Z")

</div>

Describe the bug i tried to start a cluster in kubernetes with below nodes while setting pods memory limits 3G 2 clients nodes 3 masters nodes 3 Data nodes The problem that i found is that elastic pods dont see this…

---

## [Questions related to Elastic Cloud: upsizing, load-balancing, auto-restarts, S3 archiving](https://discuss.elastic.co/t/questions-related-to-elastic-cloud-upsizing-load-balancing-auto-restarts-s3-archiving/196459)

<div class="topic-metadata">

**Author:** [@marko\_vranjkovic](https://discuss.elastic.co/u/marko_vranjkovic)\
**Replies:** 1\
**Last updated:** [August 30, 2019, 6:32pm UTC](https://discuss.elastic.co/t/questions-related-to-elastic-cloud-upsizing-load-balancing-auto-restarts-s3-archiving/196459 "2019-08-30T18:32:56Z")

</div>

Hello, I'm doing a research on Elastic Cloud using AWS and have several questions: Can we down/upsize elastic instances without downtime? The endpoint here: Is that an endpoint to a load balancer? If is, which …

---

## [Realtime Clone in cloud without affecting Local Cluster](https://discuss.elastic.co/t/realtime-clone-in-cloud-without-affecting-local-cluster/196806)

<div class="topic-metadata">

**Author:** [@sspilleman](https://discuss.elastic.co/u/sspilleman)\
**Replies:** 2\
**Last updated:** [August 30, 2019, 6:28pm UTC](https://discuss.elastic.co/t/realtime-clone-in-cloud-without-affecting-local-cluster/196806 "2019-08-30T18:28:06Z")

</div>

Hi, I have a 3-node cluster on-premise. I want to create a full clone in a cloud (oracle). that syncs a few indexes to the on-premise cluster. My cloud environment is not "always-on" however. I don't want my local on-p…

---

## [Cannot connect to localhost:9200 after installing search guard](https://discuss.elastic.co/t/cannot-connect-to-localhost-9200-after-installing-search-guard/197562)

<div class="topic-metadata">

**Author:** [@vampire](https://discuss.elastic.co/u/vampire)\
**Replies:** 1\
**Last updated:** [August 30, 2019, 6:26pm UTC](https://discuss.elastic.co/t/cannot-connect-to-localhost-9200-after-installing-search-guard/197562 "2019-08-30T18:26:20Z")

</div>

Hi Guys: I am trying to install the Search guard 36.0.0 on Elasticsearch:7.1.1 using Docker. the Dockerfile looks like this # https://github.com/elastic/elasticsearch-docker FROM docker.elastic.co/elasticsearch/elastic…

---

## [How to write case statement in Where clause](https://discuss.elastic.co/t/how-to-write-case-statement-in-where-clause/197220)

<div class="topic-metadata">

**Author:** [@navjeet.singh](https://discuss.elastic.co/u/navjeet.singh)\
**Replies:** 4\
**Last updated:** [August 30, 2019, 6:10pm UTC](https://discuss.elastic.co/t/how-to-write-case-statement-in-where-clause/197220 "2019-08-30T18:10:13Z")

</div>

Hello Team , i am trying to run the below query but it gives me error as mismatch any idea what i am doing wrong. SELECT \* FROM "chat\_comment" c1 where (c1."createdDate" \>= '2019-08-27' AND c1."createdDate" \<= '20…

---

## [Not able to execute painless scripts](https://discuss.elastic.co/t/not-able-to-execute-painless-scripts/197339)

<div class="topic-metadata">

**Author:** [@manish\_kakoti](https://discuss.elastic.co/u/manish_kakoti)\
**Replies:** 1\
**Last updated:** [August 30, 2019, 5:52pm UTC](https://discuss.elastic.co/t/not-able-to-execute-painless-scripts/197339 "2019-08-30T17:52:01Z")

</div>

I am quite new to painless or any kind of scripting in elastic. I wanted to know how do i execute a script in elastic. Scenario: I have a mapping.json, with all the fields to be indexed in elastic. I am using elasticse…

---

## [Attempting to perform aggregation script on ES buckets](https://discuss.elastic.co/t/attempting-to-perform-aggregation-script-on-es-buckets/197155)

<div class="topic-metadata">

**Author:** [@Arty\_Sidorenko](https://discuss.elastic.co/u/Arty_Sidorenko)\
**Replies:** 1\
**Last updated:** [August 30, 2019, 5:29pm UTC](https://discuss.elastic.co/t/attempting-to-perform-aggregation-script-on-es-buckets/197155 "2019-08-30T17:29:54Z")

</div>

Hi, I'm trying to use a bucket script to calculate the proportion of total of one of my buckets (query snippet below). I was getting an error of type "Only sibling pipeline aggregations are allowed at the top level" so…

---

## [Update the Merge\_id field within aggregated Bucket using painless](https://discuss.elastic.co/t/update-the-merge-id-field-within-aggregated-bucket-using-painless/197286)

<div class="topic-metadata">

**Author:** [@Tayyab80](https://discuss.elastic.co/u/Tayyab80)\
**Replies:** 1\
**Last updated:** [August 30, 2019, 5:22pm UTC](https://discuss.elastic.co/t/update-the-merge-id-field-within-aggregated-bucket-using-painless/197286 "2019-08-30T17:22:10Z")

</div>

I am new to elasticsearch and Painless, so need some guidance I want to update values of Merge\_ID in bucket result according to minimum of merge\_ID in a bucket group members' and apply that rest of bucket members Merge…

---

## [Index.blocks.read\_only vs Frozen indices](https://discuss.elastic.co/t/index-blocks-read-only-vs-frozen-indices/196994)

<div class="topic-metadata">

**Author:** [@Karthik\_Ramachandran](https://discuss.elastic.co/u/Karthik_Ramachandran)\
**Replies:** 1\
**Last updated:** [August 30, 2019, 5:14pm UTC](https://discuss.elastic.co/t/index-blocks-read-only-vs-frozen-indices/196994 "2019-08-30T17:14:24Z")

</div>

Trying to clarify between read-only and frozen indices. We have a indice setting index.blocks.read\_only, and also have Freezing option. Freezing helps with heap, but trying to understand not freezing and setting only th…

---

## [Nearly 50% shards marked as 'unassigned' after cluster restart](https://discuss.elastic.co/t/nearly-50-shards-marked-as-unassigned-after-cluster-restart/197012)

<div class="topic-metadata">

**Author:** [@ethrbunny](https://discuss.elastic.co/u/ethrbunny)\
**Replies:** 2\
**Last updated:** [August 30, 2019, 5:06pm UTC](https://discuss.elastic.co/t/nearly-50-shards-marked-as-unassigned-after-cluster-restart/197012 "2019-08-30T17:06:53Z")

</div>

Working cluster running in Kubernetes. This morning I updated k8 + docker and this meant restarting the master node(s) which meant restarting everything. (thread) This is a familiar process - we've done it pretty regular…

---

## [Problem with ELK Cluster, Unassigned Shards](https://discuss.elastic.co/t/problem-with-elk-cluster-unassigned-shards/197470)

<div class="topic-metadata">

**Author:** [@Volodymyr\_Zarytskyy](https://discuss.elastic.co/u/Volodymyr_Zarytskyy)\
**Replies:** 1\
**Last updated:** [August 30, 2019, 4:55pm UTC](https://discuss.elastic.co/t/problem-with-elk-cluster-unassigned-shards/197470 "2019-08-30T16:55:08Z")

</div>

Hi, I need help with an ELK cluster. I'm new at this. I have a cluster formed by 3 Logstash nodes, 3 Elasticsearch nodes and 1 Kibana node. A week ago the Elasticsearch nodes had no space and didn't let you authenticat…

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

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