# Elasticsearch

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

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

**Page:** 1811

---

## [How to Query path\_hierarchy tokenized field](https://discuss.elastic.co/t/how-to-query-path-hierarchy-tokenized-field/117624)

<div class="topic-metadata">

**Author:** [@Johnz86](https://discuss.elastic.co/u/Johnz86)\
**Replies:** 0\
**Last updated:** [January 30, 2018, 1:17pm UTC](https://discuss.elastic.co/t/how-to-query-path-hierarchy-tokenized-field/117624 "2018-01-30T13:17:16Z")

</div>

I have serveral hundred objects with path information something like: { "id": "9", "metadata": \[ { "5": "C:/GIT/test-data/create/output/dataset\_2/AX\_0004" } \] } I have following mapping: { "dom…

---

## [Audit Log Exclude by Origin / Principal](https://discuss.elastic.co/t/audit-log-exclude-by-origin-principal/116902)

<div class="topic-metadata">

**Author:** [@lask001](https://discuss.elastic.co/u/lask001)\
**Replies:** 7\
**Last updated:** [January 25, 2018, 6:21pm UTC](https://discuss.elastic.co/t/audit-log-exclude-by-origin-principal/116902 "2018-01-25T18:21:39Z")

</div>

I'm setting up audit log configurations, and I'm wondering if it's possible to not log events based on the contents. Here's an example of a log I'm trying to prevent: \[2018-01-24T10:42:37,950\] \[transport\] \[access\_grante…

---

## [Storing Data in ElasticSearch](https://discuss.elastic.co/t/storing-data-in-elasticsearch/116904)

<div class="topic-metadata">

**Author:** [@moriol](https://discuss.elastic.co/u/moriol)\
**Replies:** 2\
**Last updated:** [January 30, 2018, 1:02pm UTC](https://discuss.elastic.co/t/storing-data-in-elasticsearch/116904 "2018-01-30T13:02:05Z")

</div>

I have noticed by default all my data is stored under \_source in ElasticSearch. I have some questions, I would like to clarify as the article below is not clear to me: https://www.elastic.co/guide/en/elasticsearch/refe…

---

## [Restoring 2 nodes cluster after master goes down](https://discuss.elastic.co/t/restoring-2-nodes-cluster-after-master-goes-down/117617)

<div class="topic-metadata">

**Author:** [@Nejc\_Vidrih](https://discuss.elastic.co/u/Nejc_Vidrih)\
**Replies:** 0\
**Last updated:** [January 30, 2018, 12:37pm UTC](https://discuss.elastic.co/t/restoring-2-nodes-cluster-after-master-goes-down/117617 "2018-01-30T12:37:26Z")

</div>

I have a 2 node elasticsearch cluster (version 1.7.1), let's call it A and B. A is data node, B is data and master node. A: node.master: false node.data: true discovery.zen.ping.unicast.hosts: \["A", "B"\] B: node.mast…

---

## [Maximum number of retries reached](https://discuss.elastic.co/t/maximum-number-of-retries-reached/117480)

<div class="topic-metadata">

**Author:** [@bbcdenmark](https://discuss.elastic.co/u/bbcdenmark)\
**Replies:** 1\
**Last updated:** [January 30, 2018, 12:35pm UTC](https://discuss.elastic.co/t/maximum-number-of-retries-reached/117480 "2018-01-30T12:35:24Z")

</div>

We got 3 different environments running Elastic Search - Development, Test and Production. But recently we started to get the error "Maximum number of retries reached" when creating an Index from a C# program, but only i…

---

## [Unable to run set-password in 6.x](https://discuss.elastic.co/t/unable-to-run-set-password-in-6-x/117382)

<div class="topic-metadata">

**Author:** [@stephenpatten](https://discuss.elastic.co/u/stephenpatten)\
**Replies:** 10\
**Last updated:** [January 30, 2018, 12:22pm UTC](https://discuss.elastic.co/t/unable-to-run-set-password-in-6-x/117382 "2018-01-30T12:22:48Z")

</div>

Hello, I'm setting up a 6.1.2 windows cluster and have a gold license. This is the first machine in the cluster so I have generated a CA cert with a password and placed it in the config directory. relevant keys from th…

---

## [Convert SearchResponse to Pageable(Spring Data)](https://discuss.elastic.co/t/convert-searchresponse-to-pageable-spring-data/117611)

<div class="topic-metadata">

**Author:** [@Nikita\_Krasnov](https://discuss.elastic.co/u/Nikita_Krasnov)\
**Replies:** 0\
**Last updated:** [January 30, 2018, 12:15pm UTC](https://discuss.elastic.co/t/convert-searchresponse-to-pageable-spring-data/117611 "2018-01-30T12:15:32Z")

</div>

Hi to everybode. How I can convert SearchResponse to Pageable(Spring Data)? From such response: { "code": 200, "error": "", "message": "", "data": { "hits": \[ { "sco…

---

## [Field collapse - can't sort inner hits to take latest document?](https://discuss.elastic.co/t/field-collapse-cant-sort-inner-hits-to-take-latest-document/117506)

<div class="topic-metadata">

**Author:** [@Thomas\_Millward\_Wrig](https://discuss.elastic.co/u/Thomas_Millward_Wrig)\
**Replies:** 5\
**Last updated:** [January 30, 2018, 11:55am UTC](https://discuss.elastic.co/t/field-collapse-cant-sort-inner-hits-to-take-latest-document/117506 "2018-01-30T11:55:22Z")

</div>

I'm trying to perform a search that returns the most recent document per unique value of field "unique\_hash". I'm using a "field collapse" aggregation, like so: { "query": { "bool": { "filter": \[ { …

---

## [Aggregated top hits with Date Range filter](https://discuss.elastic.co/t/aggregated-top-hits-with-date-range-filter/117606)

<div class="topic-metadata">

**Author:** [@smlbiobot](https://discuss.elastic.co/u/smlbiobot)\
**Replies:** 0\
**Last updated:** [January 30, 2018, 11:54am UTC](https://discuss.elastic.co/t/aggregated-top-hits-with-date-range-filter/117606 "2018-01-30T11:54:59Z")

</div>

I am trying to add top hits to an existing query with date range applied, but when I do that, the top hits returned include dates outside of the date range set in the query. What am I doing wrong here? Do I need to also …

---

## [org.elasticsearch.common.util.concurrent.EsRejectedExecutionException: rejected execution of org.elasticsearch.transport.TransportService](https://discuss.elastic.co/t/org-elasticsearch-common-util-concurrent-esrejectedexecutionexception-rejected-execution-of-org-elasticsearch-transport-transportservice/117431)

<div class="topic-metadata">

**Author:** [@reeenz20](https://discuss.elastic.co/u/reeenz20)\
**Replies:** 24\
**Last updated:** [January 30, 2018, 11:24am UTC](https://discuss.elastic.co/t/org-elasticsearch-common-util-concurrent-esrejectedexecutionexception-rejected-execution-of-org-elasticsearch-transport-transportservice/117431 "2018-01-30T11:24:52Z")

</div>

Hi guys, I have this error on elasticsearch. The logs keeps on increasing. Urgently needed help here. Thank you! :slight\_smile: org.elasticsearch.common.util.concurrent.EsRejectedExecutionException: rejected execution o…

---

## [Elasticsearch service fails immediately after start](https://discuss.elastic.co/t/elasticsearch-service-fails-immediately-after-start/116885)

<div class="topic-metadata">

**Author:** [@ivan\_p](https://discuss.elastic.co/u/ivan_p)\
**Replies:** 5\
**Last updated:** [January 30, 2018, 11:17am UTC](https://discuss.elastic.co/t/elasticsearch-service-fails-immediately-after-start/116885 "2018-01-30T11:17:10Z")

</div>

Hi folks, The title describes the essense of my problem pretty much. I'm running ES 5.5.2 on a VM with Ubuntu 16.04 (it's VirtualBox 5.2.6). All files in the /var/log/elasticsearch directory are empty. journalctl -u e…

---

## [Arrayindexofbounds during aggregation](https://discuss.elastic.co/t/arrayindexofbounds-during-aggregation/117581)

<div class="topic-metadata">

**Author:** [@turif](https://discuss.elastic.co/u/turif)\
**Replies:** 2\
**Last updated:** [January 30, 2018, 9:58am UTC](https://discuss.elastic.co/t/arrayindexofbounds-during-aggregation/117581 "2018-01-30T09:58:25Z")

</div>

Hi, Sometimes I get ArrayIndexofBounds exception during aggregation sometimes not. (only the data is different.) we use ES6.1.3 and elastic low level client 5.6.6. The cluster is upgraded from elastic 5.6.x. Aggregat…

---

## [Query Time Divergence After First Try](https://discuss.elastic.co/t/query-time-divergence-after-first-try/117602)

<div class="topic-metadata">

**Author:** [@vitorlui](https://discuss.elastic.co/u/vitorlui)\
**Replies:** 0\
**Last updated:** [January 30, 2018, 10:44am UTC](https://discuss.elastic.co/t/query-time-divergence-after-first-try/117602 "2018-01-30T10:44:44Z")

</div>

Hello, We are running a small cluster with 6 machines with 1TB of load data (Elasticsearch v5.6). We are running performance tests using 10 specific queries in a bash file calling with curl. In the first test running t…

---

## [Trying to extract data from MySQL](https://discuss.elastic.co/t/trying-to-extract-data-from-mysql/117591)

<div class="topic-metadata">

**Author:** [@Hassan\_Shaitou](https://discuss.elastic.co/u/Hassan_Shaitou)\
**Replies:** 9\
**Last updated:** [January 30, 2018, 10:24am UTC](https://discuss.elastic.co/t/trying-to-extract-data-from-mysql/117591 "2018-01-30T10:24:31Z")

</div>

I am following this tutorial: http://r2d2.cc/2015/08/05/elastic-search-on-windows-with-mysql-sql-server-2014-and-import-feeder/, I want to extract data from mysql and index them using elastic. I am using: ElasticSearch…

---

## [Watcher - include all errors in e-mail](https://discuss.elastic.co/t/watcher-include-all-errors-in-e-mail/117575)

<div class="topic-metadata">

**Author:** [@pp\_macrix](https://discuss.elastic.co/u/pp_macrix)\
**Replies:** 3\
**Last updated:** [January 30, 2018, 10:05am UTC](https://discuss.elastic.co/t/watcher-include-all-errors-in-e-mail/117575 "2018-01-30T10:05:36Z")

</div>

I've created a watch which shows me how many errors have been written in the log file (which is taken by logstash and then transferred to elasticSearch) for a specific range of time. For now in the email body I send th…

---

## [Join implementation for multiple master data](https://discuss.elastic.co/t/join-implementation-for-multiple-master-data/117596)

<div class="topic-metadata">

**Author:** [@Sivaprakash\_Shanmuga](https://discuss.elastic.co/u/Sivaprakash_Shanmuga)\
**Replies:** 0\
**Last updated:** [January 30, 2018, 10:02am UTC](https://discuss.elastic.co/t/join-implementation-for-multiple-master-data/117596 "2018-01-30T10:02:41Z")

</div>

Hi Here is my MySQL database design Table 1 (Foregion Key refernce) userId deviceId groupId All these fields are referred from other table where I kept User, Device, Group - names and other info. Im trying to move …

---

## [Strict and fuzzy searching in ES](https://discuss.elastic.co/t/strict-and-fuzzy-searching-in-es/117482)

<div class="topic-metadata">

**Author:** [@Nikita\_Krasnov](https://discuss.elastic.co/u/Nikita_Krasnov)\
**Replies:** 4\
**Last updated:** [January 30, 2018, 8:34am UTC](https://discuss.elastic.co/t/strict-and-fuzzy-searching-in-es/117482 "2018-01-30T08:34:59Z")

</div>

Here muy json: { "office": "office 52", "header": "some test" } I have such Java code: BoolQueryBuilder bqb = QueryBuilders.boolQuery(); if (esLogRequest.getHeader() != null) { bqb.filter(Query…

---

## [Shards and scalability](https://discuss.elastic.co/t/shards-and-scalability/117566)

<div class="topic-metadata">

**Author:** [@reachnavneeth](https://discuss.elastic.co/u/reachnavneeth)\
**Replies:** 6\
**Last updated:** [January 30, 2018, 7:03am UTC](https://discuss.elastic.co/t/shards-and-scalability/117566 "2018-01-30T07:03:45Z")

</div>

We have a requirement for frequent updates but the total data size per index will not be more than 5 GB. How many shards should be allocated for fast updates? The rate at which the update will happen is around 50k update…

---

## [How to deploy Elasticsearch in Kubernetes cluster?](https://discuss.elastic.co/t/how-to-deploy-elasticsearch-in-kubernetes-cluster/117563)

<div class="topic-metadata">

**Author:** [@ahrtr](https://discuss.elastic.co/u/ahrtr)\
**Replies:** 0\
**Last updated:** [January 30, 2018, 5:06am UTC](https://discuss.elastic.co/t/how-to-deploy-elasticsearch-in-kubernetes-cluster/117563 "2018-01-30T05:06:58Z")

</div>

I have a kubernetes cluster with 3 nodes, what's the best practice to deploy Elasticsearch 6.1.2 into the cluster? Is it OK to deploy Elasticsearch as a DaemonSet, and mount a hostPath for each Elasticsearch?

---

## [RestHighLevelClient - Accessing an elastic http endpoint behind reverse proxy](https://discuss.elastic.co/t/resthighlevelclient-accessing-an-elastic-http-endpoint-behind-reverse-proxy/117306)

<div class="topic-metadata">

**Author:** [@missourian](https://discuss.elastic.co/u/missourian)\
**Replies:** 2\
**Last updated:** [January 30, 2018, 4:46am UTC](https://discuss.elastic.co/t/resthighlevelclient-accessing-an-elastic-http-endpoint-behind-reverse-proxy/117306 "2018-01-30T04:46:31Z")

</div>

My elasticsearch http endpoint has been fronted with a corporate reverse proxy and also it has a path prefix. I am in the process of migrating from Transport client to HighLevelHttpClient can someone help me how to conf…

---

## [Query Elasticsearch with Readonlyrest plugin from Hive](https://discuss.elastic.co/t/query-elasticsearch-with-readonlyrest-plugin-from-hive/117383)

<div class="topic-metadata">

**Author:** [@dzyubanv](https://discuss.elastic.co/u/dzyubanv)\
**Replies:** 2\
**Last updated:** [January 30, 2018, 1:54am UTC](https://discuss.elastic.co/t/query-elasticsearch-with-readonlyrest-plugin-from-hive/117383 "2018-01-30T01:54:47Z")

</div>

I'm trying to configure and run Elasticsearch-5.6.3 with Readonlyrest plugin and Hadoop/Hive (es-hadoop-6.0 connector ) on RHEL and on different servers. Hadoop 2.7.3.2.6.3.0-235, Hive 1.2.1.100.2.6.3.0-235. The readonl…

---

## [How do I translate and format values in report columns](https://discuss.elastic.co/t/how-do-i-translate-and-format-values-in-report-columns/117524)

<div class="topic-metadata">

**Author:** [@vijayc](https://discuss.elastic.co/u/vijayc)\
**Replies:** 1\
**Last updated:** [January 29, 2018, 10:10pm UTC](https://discuss.elastic.co/t/how-do-i-translate-and-format-values-in-report-columns/117524 "2018-01-29T22:10:27Z")

</div>

Hi all, I have created a data table visualization from a search. I want to translate the values in the columns from the raw values to some thing more meaningfull for the user. Boolean values Instead of showing true/f…

---

## [Can't use length filter in a custom normalizer. any way around?](https://discuss.elastic.co/t/cant-use-length-filter-in-a-custom-normalizer-any-way-around/117533)

<div class="topic-metadata">

**Author:** [@anon44344346](https://discuss.elastic.co/u/anon44344346)\
**Replies:** 0\
**Last updated:** [January 29, 2018, 9:14pm UTC](https://discuss.elastic.co/t/cant-use-length-filter-in-a-custom-normalizer-any-way-around/117533 "2018-01-29T21:14:18Z")

</div>

I know "normalizer doesn't like trim filter", but I've also found out I can't use length filter either. Is there any way of knowing in advance which filters are accepted in a normalizer definition? What I try to accomp…

---

## [Using 2 function in same ML Job](https://discuss.elastic.co/t/using-2-function-in-same-ml-job/117520)

<div class="topic-metadata">

**Author:** [@mgarg123](https://discuss.elastic.co/u/mgarg123)\
**Replies:** 5\
**Last updated:** [January 29, 2018, 9:07pm UTC](https://discuss.elastic.co/t/using-2-function-in-same-ml-job/117520 "2018-01-29T21:07:26Z")

</div>

Hi, I have a use case where I would like to identify anomalies in the unusual time of day user logins from the unusual geo-location (latitude - longitude). From my understanding I'll have to use 2 function in the same M…

---

## [Schema migration](https://discuss.elastic.co/t/schema-migration/117304)

<div class="topic-metadata">

**Author:** [@Rei](https://discuss.elastic.co/u/Rei)\
**Replies:** 1\
**Last updated:** [January 29, 2018, 8:53pm UTC](https://discuss.elastic.co/t/schema-migration/117304 "2018-01-29T20:53:36Z")

</div>

I do not know java, so I do not know how to use the following tools. https://github.com/dadoonet/elasticsearch-beyonder Therefore, we are trying to make use of the following tools.(like RDBMS migration tool) · Prepare…

---

## [Issue while creating custom analyzers for index](https://discuss.elastic.co/t/issue-while-creating-custom-analyzers-for-index/117528)

<div class="topic-metadata">

**Author:** [@Sam\_Schlaak](https://discuss.elastic.co/u/Sam_Schlaak)\
**Replies:** 1\
**Last updated:** [January 29, 2018, 8:51pm UTC](https://discuss.elastic.co/t/issue-while-creating-custom-analyzers-for-index/117528 "2018-01-29T20:51:29Z")

</div>

I'm trying to add a tokenizer and three analyzers to my index at creation time. Here's the code: client.admin().indices().prepareCreate(indexName).setSettings(Settings.builder().loadFromSource(jsonBuilder() …

---

## [How to return whole date range in Date Histogram aggegation](https://discuss.elastic.co/t/how-to-return-whole-date-range-in-date-histogram-aggegation/117531)

<div class="topic-metadata">

**Author:** [@smlbiobot](https://discuss.elastic.co/u/smlbiobot)\
**Replies:** 0\
**Last updated:** [January 29, 2018, 8:27pm UTC](https://discuss.elastic.co/t/how-to-return-whole-date-range-in-date-histogram-aggegation/117531 "2018-01-29T20:27:17Z")

</div>

I am using Date Histogram to aggregation values over time. The problem is that I see that if that date has no data, it just omits it completely. What I need it to do is enter it as null. I try to use missing and also min…

---

## [Handshake failed, unexpected remote node (IP/port changes)](https://discuss.elastic.co/t/handshake-failed-unexpected-remote-node-ip-port-changes/117386)

<div class="topic-metadata">

**Author:** [@iquito](https://discuss.elastic.co/u/iquito)\
**Replies:** 0\
**Last updated:** [January 29, 2018, 1:12am UTC](https://discuss.elastic.co/t/handshake-failed-unexpected-remote-node-ip-port-changes/117386 "2018-01-29T01:12:14Z")

</div>

I am trying to change my elasticsearch.yml config so elasticsearch uses a TCP tunnel between my servers instead of a direct connection. I managed this without problems with MariaDB. For this I am attempting to just chan…

---

## [Data node high CPU](https://discuss.elastic.co/t/data-node-high-cpu/117014)

<div class="topic-metadata">

**Author:** [@Itay\_Bittan](https://discuss.elastic.co/u/Itay_Bittan)\
**Replies:** 18\
**Last updated:** [January 29, 2018, 5:46pm UTC](https://discuss.elastic.co/t/data-node-high-cpu/117014 "2018-01-29T17:46:18Z")

</div>

Hi Guys (@Christian\_Dahlqvist / @Igor\_Motov), Setup: Elasticsearch 1.4.7 (legacy) 3 master nodes - 2GB RAM, 1vCPUs. 4 data nodes - 30GB RAM, 8 vCPUs, EBS 500GB SSD two different availability zones. 2 client nodes - …

---

## [Get Current Time and date](https://discuss.elastic.co/t/get-current-time-and-date/117459)

<div class="topic-metadata">

**Author:** [@devil\_srj7](https://discuss.elastic.co/u/devil_srj7)\
**Replies:** 2\
**Last updated:** [January 29, 2018, 3:46pm UTC](https://discuss.elastic.co/t/get-current-time-and-date/117459 "2018-01-29T15:46:12Z")

</div>

I need to retrieve all the records between Start of the day to End of the day For Eg: 2018-01-29 00:00:00 - 2018-01-29 23:59:59 Similarly, I need to get current Time and Date. GET \_search { "size": 1, "script…

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

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