# Elasticsearch

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

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

**Page:** 1227

---

## [Java: Getting the average of a calculation](https://discuss.elastic.co/t/java-getting-the-average-of-a-calculation/190619)

<div class="topic-metadata">

**Author:** [@tzn01](https://discuss.elastic.co/u/tzn01)\
**Replies:** 1\
**Last updated:** [July 16, 2019, 1:35am UTC](https://discuss.elastic.co/t/java-getting-the-average-of-a-calculation/190619 "2019-07-16T01:35:26Z")

</div>

Hi, I am using ElasticSearch 6.3 and I want to do a calculation on two fields and get the average of the results. First I tried with org.elasticsearch.client : transport as noted in the doc, but noticed some things wer…

---

## [Date\_histogram with date range](https://discuss.elastic.co/t/date-histogram-with-date-range/190450)

<div class="topic-metadata">

**Author:** [@nitingarg](https://discuss.elastic.co/u/nitingarg)\
**Replies:** 3\
**Last updated:** [July 16, 2019, 1:08am UTC](https://discuss.elastic.co/t/date-histogram-with-date-range/190450 "2019-07-16T01:08:13Z")

</div>

I tried to use date histogram with specific range , { "aggs": { "group\_by\_created\_ts": { "range": { "date\_histogram": { "field": "created\_ts", "interval": "day", "format": "yyyy-MM-dd", "ranges": \[ { "to": "20…

---

## [Query aggregation help](https://discuss.elastic.co/t/query-aggregation-help/190442)

<div class="topic-metadata">

**Author:** [@LukeBrayy](https://discuss.elastic.co/u/LukeBrayy)\
**Replies:** 1\
**Last updated:** [July 16, 2019, 12:50am UTC](https://discuss.elastic.co/t/query-aggregation-help/190442 "2019-07-16T00:50:24Z")

</div>

Hi All, I have an index filled with the documents following this format: "\_source": { "reportNumber": #a non unique number ranging from 0- 500,000 "text": #roughly a paragraph of text …

---

## [How to reindex documents from certain dates?](https://discuss.elastic.co/t/how-to-reindex-documents-from-certain-dates/190602)

<div class="topic-metadata">

**Author:** [@praveengadugin1](https://discuss.elastic.co/u/praveengadugin1)\
**Replies:** 0\
**Last updated:** [July 15, 2019, 7:20pm UTC](https://discuss.elastic.co/t/how-to-reindex-documents-from-certain-dates/190602 "2019-07-15T19:20:40Z")

</div>

We have an index of 14 million records(2.5TB). We have been successful in reindexing all of them but 80K docs. Those are spread around different dates. Our documents are from 1980 to present. We figured out that missing …

---

## [Reindex using REST api and high level client](https://discuss.elastic.co/t/reindex-using-rest-api-and-high-level-client/190119)

<div class="topic-metadata">

**Author:** [@shradhatx](https://discuss.elastic.co/u/shradhatx)\
**Replies:** 1\
**Last updated:** [July 15, 2019, 7:19pm UTC](https://discuss.elastic.co/t/reindex-using-rest-api-and-high-level-client/190119 "2019-07-15T19:19:39Z")

</div>

ReindexRequest request = new ReindexRequest(); request.setSourceIndices("mytest"); request.setDestIndex("mytest"); request.setScroll(TimeValue.timeValueMinutes(5)); request.setRemoteInfo( …

---

## [How to send a query as String with the Java API Rest](https://discuss.elastic.co/t/how-to-send-a-query-as-string-with-the-java-api-rest/190536)

<div class="topic-metadata">

**Author:** [@matheusribeirogarcia](https://discuss.elastic.co/u/matheusribeirogarcia)\
**Replies:** 7\
**Last updated:** [July 15, 2019, 6:20pm UTC](https://discuss.elastic.co/t/how-to-send-a-query-as-string-with-the-java-api-rest/190536 "2019-07-15T18:20:01Z")

</div>

Hello, I'm trying to send a Update request using a Query as String, but to write an query in JSON format in java, I have to use ", but the parser can't understand this characters, what could I do? For example, having th…

---

## [Update counter by bucket?](https://discuss.elastic.co/t/update-counter-by-bucket/190596)

<div class="topic-metadata">

**Author:** [@yobrohowitgo](https://discuss.elastic.co/u/yobrohowitgo)\
**Replies:** 0\
**Last updated:** [July 15, 2019, 6:17pm UTC](https://discuss.elastic.co/t/update-counter-by-bucket/190596 "2019-07-15T18:17:53Z")

</div>

I have an agg query that combines documents with the same email in buckets. I am trying to implement a counter that increments an ID by bucket - but the records within each bucket should have the same ID. I have seen the…

---

## [Master Node Goes down + Transport Client always connecting to Elected Master](https://discuss.elastic.co/t/master-node-goes-down-transport-client-always-connecting-to-elected-master/190297)

<div class="topic-metadata">

**Author:** [@Karthik\_Ramachandran](https://discuss.elastic.co/u/Karthik_Ramachandran)\
**Replies:** 2\
**Last updated:** [July 15, 2019, 6:11pm UTC](https://discuss.elastic.co/t/master-node-goes-down-transport-client-always-connecting-to-elected-master/190297 "2019-07-15T18:11:02Z")

</div>

ES Version 6.x, Transport Client 6.x We see the behavior of elected master using high CPU and JVM always, and goes off when it reaches a higher number ~75% removing and restarting node. I'm suspicious whether it is due …

---

## [How to sort by minimum distance between multiple fields](https://discuss.elastic.co/t/how-to-sort-by-minimum-distance-between-multiple-fields/189635)

<div class="topic-metadata">

**Author:** [@dailydm1227](https://discuss.elastic.co/u/dailydm1227)\
**Replies:** 8\
**Last updated:** [July 15, 2019, 4:54pm UTC](https://discuss.elastic.co/t/how-to-sort-by-minimum-distance-between-multiple-fields/189635 "2019-07-15T16:54:31Z")

</div>

I would like to sort results based on the minimum distance found from a few different geo\_point fields. Here is a basic example: Mapping: { "companies" : { "mappings" : { "\_doc" : { "properties" : …

---

## [How to index graphs ? And how to search in graphs?](https://discuss.elastic.co/t/how-to-index-graphs-and-how-to-search-in-graphs/187117)

<div class="topic-metadata">

**Author:** [@Wassim\_Ben\_Amor](https://discuss.elastic.co/u/Wassim_Ben_Amor)\
**Replies:** 3\
**Last updated:** [July 15, 2019, 4:50pm UTC](https://discuss.elastic.co/t/how-to-index-graphs-and-how-to-search-in-graphs/187117 "2019-07-15T16:50:31Z")

</div>

Hello, I'm trying to find a way to index a graph. The idea is : I have documents like : { "name": "apple", "edges": \[ { "type" : "isA", "value" : "company" } , { "type" : "isA", "value" : "fruit" } \] } or …

---

## [What's the recommended strategy to reindex all (over 500) indices from 5.6.3 to 7.x?](https://discuss.elastic.co/t/whats-the-recommended-strategy-to-reindex-all-over-500-indices-from-5-6-3-to-7-x/190124)

<div class="topic-metadata">

**Author:** [@shradhatx](https://discuss.elastic.co/u/shradhatx)\
**Replies:** 13\
**Last updated:** [July 15, 2019, 4:49pm UTC](https://discuss.elastic.co/t/whats-the-recommended-strategy-to-reindex-all-over-500-indices-from-5-6-3-to-7-x/190124 "2019-07-15T16:49:08Z")

</div>

I have to migrate from ES5.6.3 to latest ES 7.x There are over 500 indices, 10 flavor of index, high number of index because of rollover ex index1-yyyy.mm and so on. The two options can be - scripting - ex bash script…

---

## [Match a child document limited to its great-grandparent document](https://discuss.elastic.co/t/match-a-child-document-limited-to-its-great-grandparent-document/190287)

<div class="topic-metadata">

**Author:** [@droplet](https://discuss.elastic.co/u/droplet)\
**Replies:** 1\
**Last updated:** [July 15, 2019, 4:38pm UTC](https://discuss.elastic.co/t/match-a-child-document-limited-to-its-great-grandparent-document/190287 "2019-07-15T16:38:07Z")

</div>

Hi there, I'm trying to get some results of an index which has parent-child relationships set like so: PUT /attributes { "mappings": { "properties": { "preset\_to\_attribute\_to…

---

## [Where does the analyzers setting go? yml file or somewhere else](https://discuss.elastic.co/t/where-does-the-analyzers-setting-go-yml-file-or-somewhere-else/190519)

<div class="topic-metadata">

**Author:** [@decodeit](https://discuss.elastic.co/u/decodeit)\
**Replies:** 5\
**Last updated:** [July 15, 2019, 4:28pm UTC](https://discuss.elastic.co/t/where-does-the-analyzers-setting-go-yml-file-or-somewhere-else/190519 "2019-07-15T16:28:41Z")

</div>

Hello, I have been reading on elasticsearch analyzer and testing via postman. Now my elasticsearch runs in docker with docker-compose. Where should I specify the analyzer settings/configurations? Thank you

---

## [Invalid date because milliseconds does not contains trailing zeros](https://discuss.elastic.co/t/invalid-date-because-milliseconds-does-not-contains-trailing-zeros/189874)

<div class="topic-metadata">

**Author:** [@Thiago\_Coimbra\_Lemos](https://discuss.elastic.co/u/Thiago_Coimbra_Lemos)\
**Replies:** 6\
**Last updated:** [July 15, 2019, 4:03pm UTC](https://discuss.elastic.co/t/invalid-date-because-milliseconds-does-not-contains-trailing-zeros/189874 "2019-07-15T16:03:24Z")

</div>

TL;DR; Valid: 2019-07-10T17:01:01.500Z Valid: 2019-07-10T17:01:01.50Z INVALID: 2019-07-10T17:01:01.5Z I want to know how to accept the invalid value as a valid value, since it is a valid date value. I'm trying to …

---

## [Cluster Setup 3 Node Cluster problem](https://discuss.elastic.co/t/cluster-setup-3-node-cluster-problem/188526)

<div class="topic-metadata">

**Author:** [@thev0yager](https://discuss.elastic.co/u/thev0yager)\
**Replies:** 47\
**Last updated:** [July 15, 2019, 3:41pm UTC](https://discuss.elastic.co/t/cluster-setup-3-node-cluster-problem/188526 "2019-07-15T15:41:46Z")

</div>

Hi all, I have been working on getting a Elastic Stack cluster working for the past few weeks. I was told to setup the elasticsearch cluster as such. I have three nodes each one of these nodes has a elasticsearch, kibana…

---

## [High segment count](https://discuss.elastic.co/t/high-segment-count/190502)

<div class="topic-metadata">

**Author:** [@Jack\_Fazackerley](https://discuss.elastic.co/u/Jack_Fazackerley)\
**Replies:** 3\
**Last updated:** [July 15, 2019, 3:18pm UTC](https://discuss.elastic.co/t/high-segment-count/190502 "2019-07-15T15:18:42Z")

</div>

Hi, I have a Elasticsearch cluster that is running into a high shard count, which is obviously making searching slow. There is 110 Million documents, each document averaging 6KB, total storage is at 350GB. Documents are…

---

## [Use live search or tending search results to boost results. (Suggestions needed)](https://discuss.elastic.co/t/use-live-search-or-tending-search-results-to-boost-results-suggestions-needed/190559)

<div class="topic-metadata">

**Author:** [@WildVictor](https://discuss.elastic.co/u/WildVictor)\
**Replies:** 0\
**Last updated:** [July 15, 2019, 2:15pm UTC](https://discuss.elastic.co/t/use-live-search-or-tending-search-results-to-boost-results-suggestions-needed/190559 "2019-07-15T14:15:32Z")

</div>

I'm looking for suggestion on how to improve my current prototype. Basically I'm happy with my search results based on text matching (analyzer). Now however I would also like to boost results if they are popular. Let's …

---

## [\_update\_by\_query updates 3000 records instead of excpected 1](https://discuss.elastic.co/t/update-by-query-updates-3000-records-instead-of-excpected-1/190554)

<div class="topic-metadata">

**Author:** [@jobra](https://discuss.elastic.co/u/jobra)\
**Replies:** 0\
**Last updated:** [July 15, 2019, 2:01pm UTC](https://discuss.elastic.co/t/update-by-query-updates-3000-records-instead-of-excpected-1/190554 "2019-07-15T14:01:00Z")

</div>

Hello, In my elastic db I have one, and only one, json document where a "comment" field equals to ".Stream ID:0. IP Data.somename.some.name some name:00." I am running v. 6.6.2 Running the following \_update\_by\_query …

---

## [Index.mapping.total\_fields.limit setting](https://discuss.elastic.co/t/index-mapping-total-fields-limit-setting/190552)

<div class="topic-metadata">

**Author:** [@Derrick](https://discuss.elastic.co/u/Derrick)\
**Replies:** 0\
**Last updated:** [July 15, 2019, 1:58pm UTC](https://discuss.elastic.co/t/index-mapping-total-fields-limit-setting/190552 "2019-07-15T13:58:30Z")

</div>

Hi, I have a lot of documents to be saved to ES, the document is pretty big and complex, I cannot limit the number of field. so the question is that how to set index.mapping.total\_fields.limit to unlimited, or which f…

---

## [Need help to properly map French cities for multi fields search and autocomplete](https://discuss.elastic.co/t/need-help-to-properly-map-french-cities-for-multi-fields-search-and-autocomplete/190480)

<div class="topic-metadata">

**Author:** [@PatriceMarin](https://discuss.elastic.co/u/PatriceMarin)\
**Replies:** 2\
**Last updated:** [July 15, 2019, 1:52pm UTC](https://discuss.elastic.co/t/need-help-to-properly-map-french-cities-for-multi-fields-search-and-autocomplete/190480 "2019-07-15T13:52:59Z")

</div>

Hi, I'm currently working on French geolocation data. Here is my model: public class Ville { public Guid Id { get; set; } public string Name { get; set; } public string ZipCode { get; set…

---

## [Date\_histogram with date range date type is text](https://discuss.elastic.co/t/date-histogram-with-date-range-date-type-is-text/190501)

<div class="topic-metadata">

**Author:** [@nitingarg](https://discuss.elastic.co/u/nitingarg)\
**Replies:** 4\
**Last updated:** [July 15, 2019, 1:50pm UTC](https://discuss.elastic.co/t/date-histogram-with-date-range-date-type-is-text/190501 "2019-07-15T13:50:27Z")

</div>

{ "query": { "range": { "created\_ts": { "from": "2018-03-28", "to": "2019-07-28" } } }, "aggs": { "group\_by\_created\_ts": { "date\_histogram": { "field": "created\_ts", "interval": "day", "format": "yyyy-MM-dd…

---

## [New with elastic need some help](https://discuss.elastic.co/t/new-with-elastic-need-some-help/190373)

<div class="topic-metadata">

**Author:** [@javier\_Munoz](https://discuss.elastic.co/u/javier_Munoz)\
**Replies:** 4\
**Last updated:** [July 15, 2019, 1:14pm UTC](https://discuss.elastic.co/t/new-with-elastic-need-some-help/190373 "2019-07-15T13:14:53Z")

</div>

Hello, I new with elastic. I wnat to send data from nginx server to audit access usage. Searching in google I saw a way to send data in json format using nginx json formater. From nginex I send messagesto local rsyslog, …

---

## [Elasticsearch data structure & changing mapping](https://discuss.elastic.co/t/elasticsearch-data-structure-changing-mapping/190426)

<div class="topic-metadata">

**Author:** [@datademo](https://discuss.elastic.co/u/datademo)\
**Replies:** 11\
**Last updated:** [July 15, 2019, 1:04pm UTC](https://discuss.elastic.co/t/elasticsearch-data-structure-changing-mapping/190426 "2019-07-15T13:04:17Z")

</div>

Hi, We have an application around data visualisation running purely from Elasticsearch and have a question regarding the our current data structure within Elastcsearch and how that can lead to mapping explosion. The da…

---

## [ILM not rolling over at correct size](https://discuss.elastic.co/t/ilm-not-rolling-over-at-correct-size/190160)

<div class="topic-metadata">

**Author:** [@jamesp220291](https://discuss.elastic.co/u/jamesp220291)\
**Replies:** 10\
**Last updated:** [July 15, 2019, 12:44pm UTC](https://discuss.elastic.co/t/ilm-not-rolling-over-at-correct-size/190160 "2019-07-15T12:44:20Z")

</div>

Hi I have created an ILM policy and applied it to my Index - { "policy": "my\_logs\_policy", "phase\_definition": { "min\_age": "0ms", "actions": { "rollover": { "max\_size": "30gb" } } }, I have also set the belo…

---

## [Filtering object](https://discuss.elastic.co/t/filtering-object/190486)

<div class="topic-metadata">

**Author:** [@bala\_sal](https://discuss.elastic.co/u/bala_sal)\
**Replies:** 1\
**Last updated:** [July 15, 2019, 12:21pm UTC](https://discuss.elastic.co/t/filtering-object/190486 "2019-07-15T12:21:00Z")

</div>

I do not understand why this is not working. mapping : { "properties": { "id": { "type": "integer" }, "tags": { "properties": { "value": { "type": "text" }, "…

---

## [Rollup jobs index pattern](https://discuss.elastic.co/t/rollup-jobs-index-pattern/190523)

<div class="topic-metadata">

**Author:** [@forestnd](https://discuss.elastic.co/u/forestnd)\
**Replies:** 0\
**Last updated:** [July 15, 2019, 11:58am UTC](https://discuss.elastic.co/t/rollup-jobs-index-pattern/190523 "2019-07-15T11:58:16Z")

</div>

Hay I am trying to create my first rollup job I want to rollup my metricbeats data, i want to set the index patten to be metricbeat-\*-yyyy.mm.dd, but it keeps failing, am i am to do this? Thanks

---

## [Dockerized elastic cluster "failed to send join request to master"](https://discuss.elastic.co/t/dockerized-elastic-cluster-failed-to-send-join-request-to-master/190506)

<div class="topic-metadata">

**Author:** [@Alaa\_bdira](https://discuss.elastic.co/u/Alaa_bdira)\
**Replies:** 2\
**Last updated:** [July 15, 2019, 11:41am UTC](https://discuss.elastic.co/t/dockerized-elastic-cluster-failed-to-send-join-request-to-master/190506 "2019-07-15T11:41:00Z")

</div>

Hello i'm trying to set an elastic cluster on 2 different hosts with 2 nodes running on docker. i'm running on Red Hat Enterprise Linux Server : 7.4 (Maipo) with openjdk version "1.8.0\_161" and Elasticsearch 6.8.0. Aft…

---

## [Send an email alert after 3 major/critical anomalies for a given time range](https://discuss.elastic.co/t/send-an-email-alert-after-3-major-critical-anomalies-for-a-given-time-range/190470)

<div class="topic-metadata">

**Author:** [@jasgc](https://discuss.elastic.co/u/jasgc)\
**Replies:** 2\
**Last updated:** [July 15, 2019, 11:51am UTC](https://discuss.elastic.co/t/send-an-email-alert-after-3-major-critical-anomalies-for-a-given-time-range/190470 "2019-07-15T11:51:22Z")

</div>

Is there a way for a watcher to generate email alert only after encountering 3 or more major/critical anomalies for a time range (i.e. if it encounters 3 anomalies within 3 months)?

---

## [Regex to extract number from text](https://discuss.elastic.co/t/regex-to-extract-number-from-text/190507)

<div class="topic-metadata">

**Author:** [@amr.abdelfattah](https://discuss.elastic.co/u/amr.abdelfattah)\
**Replies:** 1\
**Last updated:** [July 15, 2019, 11:50am UTC](https://discuss.elastic.co/t/regex-to-extract-number-from-text/190507 "2019-07-15T11:50:52Z")

</div>

I want to extract number of Milliseconds from below text with regex (i.e extract 762 from in \[762\] Millies ) 2019-07-02 16:56:44.824 \[SUBSCRIBER\_PROFILE-1115501650-9f7a9309-6bd7-44fb-83ea-2ee0ff37a50d\] Response \[\<?xml v…

---

## [Term Query for short keywords that include spaces](https://discuss.elastic.co/t/term-query-for-short-keywords-that-include-spaces/190351)

<div class="topic-metadata">

**Author:** [@droplet](https://discuss.elastic.co/u/droplet)\
**Replies:** 2\
**Last updated:** [July 15, 2019, 11:44am UTC](https://discuss.elastic.co/t/term-query-for-short-keywords-that-include-spaces/190351 "2019-07-15T11:44:02Z")

</div>

Hi there, stuck on a simple problem. I have an index containing various RAM sizes (1GB, 2GB, 3GB, 4GB...24GB) Is there a way to use Term query to check if RAM size exists in the index? Search for "4 GB" (notice the s…

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

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