# Elasticsearch

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

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

**Page:** 1492

---

## [Mock RestHighLevelClient to check connection establishment in Elasticsearch server](https://discuss.elastic.co/t/mock-resthighlevelclient-to-check-connection-establishment-in-elasticsearch-server/155667)

<div class="topic-metadata">

**Author:** [@ksrikanthh](https://discuss.elastic.co/u/ksrikanthh)\
**Replies:** 1\
**Last updated:** [November 8, 2018, 6:49am UTC](https://discuss.elastic.co/t/mock-resthighlevelclient-to-check-connection-establishment-in-elasticsearch-server/155667 "2018-11-08T06:49:48Z")

</div>

Hello, Can you please let me know if you have a sample code to mock RestHighLevelClient to run a junit test in java to initiate connection to elasticsearch server and check if the indexing is working as expected ? I am …

---

## [Why default number\_of\_shards is 1 in future release](https://discuss.elastic.co/t/why-default-number-of-shards-is-1-in-future-release/155814)

<div class="topic-metadata">

**Author:** [@narasimhasv](https://discuss.elastic.co/u/narasimhasv)\
**Replies:** 2\
**Last updated:** [November 8, 2018, 3:58am UTC](https://discuss.elastic.co/t/why-default-number-of-shards-is-1-in-future-release/155814 "2018-11-08T03:58:15Z")

</div>

older and current version of elasticsearch default number\_of\_shards is 5 so that it distribute and parallelize operations across shards thus increasing performance/throughput but why in the future releases default value…

---

## [How to know the \_id of a record externally?](https://discuss.elastic.co/t/how-to-know-the-id-of-a-record-externally/151247)

<div class="topic-metadata">

**Author:** [@hsluoyz](https://discuss.elastic.co/u/hsluoyz)\
**Replies:** 2\
**Last updated:** [November 8, 2018, 2:53am UTC](https://discuss.elastic.co/t/how-to-know-the-id-of-a-record-externally/151247 "2018-11-08T02:53:51Z")

</div>

I'm developing a log analysis system. The input are log files. I have an external Python program that reads the log files and decide whether a record (line) or the log files is "normal" or "malicious". I want to use Elas…

---

## [Help needed to change the password of the default elastic user with puppet module](https://discuss.elastic.co/t/help-needed-to-change-the-password-of-the-default-elastic-user-with-puppet-module/155487)

<div class="topic-metadata">

**Author:** [@clp01](https://discuss.elastic.co/u/clp01)\
**Replies:** 5\
**Last updated:** [November 8, 2018, 2:46am UTC](https://discuss.elastic.co/t/help-needed-to-change-the-password-of-the-default-elastic-user-with-puppet-module/155487 "2018-11-08T02:46:37Z")

</div>

Hi! I'm using the puppet module to manage elasticsearch (https://forge.puppet.com/elastic/elasticsearch) and x-pack. I'm not sure of the best way to change the default x-pack username and password from elastic / changem…

---

## [Would making a document non-nested improve query performance?](https://discuss.elastic.co/t/would-making-a-document-non-nested-improve-query-performance/155801)

<div class="topic-metadata">

**Author:** [@maxshortzp](https://discuss.elastic.co/u/maxshortzp)\
**Replies:** 0\
**Last updated:** [November 8, 2018, 12:22am UTC](https://discuss.elastic.co/t/would-making-a-document-non-nested-improve-query-performance/155801 "2018-11-08T00:22:30Z")

</div>

I'm working with some legacy code that has nested documents that have 1 field each. I have profile results that show that a large amount of time is sometimes spent querying the nested field. If I move to a single analy…

---

## [Elasticsearch -head chrome extension](https://discuss.elastic.co/t/elasticsearch-head-chrome-extension/155772)

<div class="topic-metadata">

**Author:** [@yolita43](https://discuss.elastic.co/u/yolita43)\
**Replies:** 3\
**Last updated:** [November 7, 2018, 10:42pm UTC](https://discuss.elastic.co/t/elasticsearch-head-chrome-extension/155772 "2018-11-07T22:42:50Z")

</div>

Hi, Can somebody tell me where i can fine some guide or examples on how to use elasticsearch head on chrome. thank you !!

---

## [Issues with size and bool queries returning data outside of criteria](https://discuss.elastic.co/t/issues-with-size-and-bool-queries-returning-data-outside-of-criteria/155774)

<div class="topic-metadata">

**Author:** [@tincupchalice](https://discuss.elastic.co/u/tincupchalice)\
**Replies:** 5\
**Last updated:** [November 7, 2018, 9:36pm UTC](https://discuss.elastic.co/t/issues-with-size-and-bool-queries-returning-data-outside-of-criteria/155774 "2018-11-07T21:36:05Z")

</div>

I understand that a query given no size will return 10 results by default. Why, I must ask if size is 10000 and the query is specific to certain data, does it return results out side of the search criteria? How then, w…

---

## [Action to take to lower build\_scorer time](https://discuss.elastic.co/t/action-to-take-to-lower-build-scorer-time/155794)

<div class="topic-metadata">

**Author:** [@maxshortzp](https://discuss.elastic.co/u/maxshortzp)\
**Replies:** 0\
**Last updated:** [November 7, 2018, 8:58pm UTC](https://discuss.elastic.co/t/action-to-take-to-lower-build-scorer-time/155794 "2018-11-07T20:58:38Z")

</div>

I'm profiling some slow queries and several times have seen the build\_scorer time appearing to dominate the the profile breakdown. Are there any actions I can take to lower the time spent in build\_scorer? Does this mea…

---

## [SSL error for a cluster node causing cluster instability](https://discuss.elastic.co/t/ssl-error-for-a-cluster-node-causing-cluster-instability/155788)

<div class="topic-metadata">

**Author:** [@elco\_comm1982](https://discuss.elastic.co/u/elco_comm1982)\
**Replies:** 0\
**Last updated:** [November 7, 2018, 8:20pm UTC](https://discuss.elastic.co/t/ssl-error-for-a-cluster-node-causing-cluster-instability/155788 "2018-11-07T20:20:58Z")

</div>

I have a node in a cluster, which keeps giving this error \[2018-11-07T11:42:44,774\]\[WARN \]\[o.e.x.s.t.n.SecurityNetty4ServerTransport\] \[es-node-001\] exception caught on transport layer \[NettyTcpChannel{localAddress=/173.…

---

## [How to copy indices from one cluster to other with settings](https://discuss.elastic.co/t/how-to-copy-indices-from-one-cluster-to-other-with-settings/155778)

<div class="topic-metadata">

**Author:** [@elk11](https://discuss.elastic.co/u/elk11)\
**Replies:** 2\
**Last updated:** [November 7, 2018, 7:31pm UTC](https://discuss.elastic.co/t/how-to-copy-indices-from-one-cluster-to-other-with-settings/155778 "2018-11-07T19:31:53Z")

</div>

Hi, I want to copy indices (with settings and everything related to that index) from one cluster to other. But according to reindex documentation: " Reindex does not attempt to set up the destination index. It does no…

---

## [Delete By Query not working in ES embedded server 5.5](https://discuss.elastic.co/t/delete-by-query-not-working-in-es-embedded-server-5-5/155768)

<div class="topic-metadata">

**Author:** [@harshadranganathan](https://discuss.elastic.co/u/harshadranganathan)\
**Replies:** 1\
**Last updated:** [November 7, 2018, 5:59pm UTC](https://discuss.elastic.co/t/delete-by-query-not-working-in-es-embedded-server-5-5/155768 "2018-11-07T17:59:16Z")

</div>

I have an embedded server running for version 5.5 public EsEmbeddedRandomServer(String home) { this.portHttp = freeRandomPort(9200, 9299); this.portTransport = freeRandomPort(9300, 9399); String clusterName…

---

## [Elasticsearch NEST query on a list of attachments](https://discuss.elastic.co/t/elasticsearch-nest-query-on-a-list-of-attachments/155619)

<div class="topic-metadata">

**Author:** [@alina.frey](https://discuss.elastic.co/u/alina.frey)\
**Replies:** 2\
**Last updated:** [November 7, 2018, 5:01pm UTC](https://discuss.elastic.co/t/elasticsearch-nest-query-on-a-list-of-attachments/155619 "2018-11-07T17:01:31Z")

</div>

Using ingest-attachment plugin. Elasticsearch version: 5.5.1 NEST: 5.5 My goal is to be able to search the Content of a list of documents called PersonDocuments attached to IndexablePersonModel, and return the…

---

## [Auto complete with filters not working](https://discuss.elastic.co/t/auto-complete-with-filters-not-working/155751)

<div class="topic-metadata">

**Author:** [@shash5259](https://discuss.elastic.co/u/shash5259)\
**Replies:** 0\
**Last updated:** [November 7, 2018, 3:43pm UTC](https://discuss.elastic.co/t/auto-complete-with-filters-not-working/155751 "2018-11-07T15:43:46Z")

</div>

Hi, we are trying to achieve auto complete, which we have achieved by suggest and fuzziness with the edge-ngram. We have roles for specific users and those roles determine whether the user can see specific subsets of a …

---

## [Snapshot and path.repo on one cluster node](https://discuss.elastic.co/t/snapshot-and-path-repo-on-one-cluster-node/155717)

<div class="topic-metadata">

**Author:** [@Guillaume\_RENARD](https://discuss.elastic.co/u/Guillaume_RENARD)\
**Replies:** 13\
**Last updated:** [November 7, 2018, 5:05pm UTC](https://discuss.elastic.co/t/snapshot-and-path-repo-on-one-cluster-node/155717 "2018-11-07T17:05:31Z")

</div>

How can I create a snapshot on my kibana index with a cluster of 4 nodes. I have created a /data/bakcup folder on my kibana host, then add path.repo=\["/data/backup"\], restarted ES; Then I try to PUT /\_snapshot/my\_backu…

---

## [Index Template Not Apllying Correctly](https://discuss.elastic.co/t/index-template-not-apllying-correctly/155750)

<div class="topic-metadata">

**Author:** [@MultiplierMultiplier](https://discuss.elastic.co/u/MultiplierMultiplier)\
**Replies:** 2\
**Last updated:** [November 7, 2018, 4:34pm UTC](https://discuss.elastic.co/t/index-template-not-apllying-correctly/155750 "2018-11-07T16:34:17Z")

</div>

Hi All, I have a cluster of ES nodes with 3 nodes in total, I would like two replica shards for each primary, I have implemented the below template which does not appear to work, any advice? { "graylog-internal" : { …

---

## [Elastic search query group only data where none of the fields contain x](https://discuss.elastic.co/t/elastic-search-query-group-only-data-where-none-of-the-fields-contain-x/155703)

<div class="topic-metadata">

**Author:** [@Tomaz\_Bratanic1](https://discuss.elastic.co/u/Tomaz_Bratanic1)\
**Replies:** 1\
**Last updated:** [November 7, 2018, 4:20pm UTC](https://discuss.elastic.co/t/elastic-search-query-group-only-data-where-none-of-the-fields-contain-x/155703 "2018-11-07T16:20:32Z")

</div>

The structure of my logs looks like this: {deviceID:"xx", charger:"xy", date: "yy", battery: 5} Is it possible to have a ES query that. Takes last 24h Excludes devices where any of the log in the last 24h had charger…

---

## [Which makes more sense: One search across multiple indices, or multiple searches across individual indexes?](https://discuss.elastic.co/t/which-makes-more-sense-one-search-across-multiple-indices-or-multiple-searches-across-individual-indexes/155741)

<div class="topic-metadata">

**Author:** [@bbaronas](https://discuss.elastic.co/u/bbaronas)\
**Replies:** 2\
**Last updated:** [November 7, 2018, 4:10pm UTC](https://discuss.elastic.co/t/which-makes-more-sense-one-search-across-multiple-indices-or-multiple-searches-across-individual-indexes/155741 "2018-11-07T16:10:59Z")

</div>

I'm certain the default answer to this question is "It depends", but I am trying to determine an effective approach to work with multiple indexes. I am trying to avoid "is it better...", so I am trying to ask when does …

---

## [N of N shards failed on Kibana after upgrading from 6.3.2 to 6.4.2](https://discuss.elastic.co/t/n-of-n-shards-failed-on-kibana-after-upgrading-from-6-3-2-to-6-4-2/155266)

<div class="topic-metadata">

**Author:** [@lcui\_dxc](https://discuss.elastic.co/u/lcui_dxc)\
**Replies:** 4\
**Last updated:** [November 7, 2018, 4:05pm UTC](https://discuss.elastic.co/t/n-of-n-shards-failed-on-kibana-after-upgrading-from-6-3-2-to-6-4-2/155266 "2018-11-07T16:05:56Z")

</div>

Hello there, We recently upgraded our ELK from 6.3.2 to 6.4.2 and I noticed many of the dashboards started having errors like "N of M shards failed". Also in the elasticsearch log, I saw the following: ============== …

---

## [Error when try to create a new cluster elasticsearch](https://discuss.elastic.co/t/error-when-try-to-create-a-new-cluster-elasticsearch/154887)

<div class="topic-metadata">

**Author:** [@elk2](https://discuss.elastic.co/u/elk2)\
**Replies:** 5\
**Last updated:** [November 6, 2018, 1:57pm UTC](https://discuss.elastic.co/t/error-when-try-to-create-a-new-cluster-elasticsearch/154887 "2018-11-06T13:57:11Z")

</div>

I would like to create an elastic cluster with 3 nodes to training purpose. This is my conf for node1 \[elastic@localhost config\]$ more elasticsearch.yml # ======================== Elasticsearch Configuration ======…

---

## [Invalid Initial heap size - Always](https://discuss.elastic.co/t/invalid-initial-heap-size-always/155725)

<div class="topic-metadata">

**Author:** [@Power\_Star](https://discuss.elastic.co/u/Power_Star)\
**Replies:** 3\
**Last updated:** [November 7, 2018, 1:59pm UTC](https://discuss.elastic.co/t/invalid-initial-heap-size-always/155725 "2018-11-07T13:59:03Z")

</div>

Anybody help me to get out from this issue. ES version - 5.5.3 OS - Centos 7 Machine Memory - 8GB Node - masternode Java Version - 1.8.1\_191 64bit Unable to start elasticsearch. JournalCtl Log: Nov 07 06:12:00 tus3el…

---

## [Api to print clustername with heap percentage](https://discuss.elastic.co/t/api-to-print-clustername-with-heap-percentage/155709)

<div class="topic-metadata">

**Author:** [@batman](https://discuss.elastic.co/u/batman)\
**Replies:** 1\
**Last updated:** [November 7, 2018, 12:43pm UTC](https://discuss.elastic.co/t/api-to-print-clustername-with-heap-percentage/155709 "2018-11-07T12:43:50Z")

</div>

Hi All, Is there any api to print elastic search node heap percentage along with cluster name? Any insight will be helpful. Thanks

---

## [Old Data Not Being Purged](https://discuss.elastic.co/t/old-data-not-being-purged/155718)

<div class="topic-metadata">

**Author:** [@SamJWeissman](https://discuss.elastic.co/u/SamJWeissman)\
**Replies:** 0\
**Last updated:** [November 7, 2018, 12:43pm UTC](https://discuss.elastic.co/t/old-data-not-being-purged/155718 "2018-11-07T12:43:35Z")

</div>

Hello, I am currently using ElasticCloud and have been attempting to modify my documents by performing the same bulk index calls I used to insert them the first go around. I was under the impression that these index ca…

---

## [Delete by query , refresh=wait\_for support?](https://discuss.elastic.co/t/delete-by-query-refresh-wait-for-support/154118)

<div class="topic-metadata">

**Author:** [@Grievoushead](https://discuss.elastic.co/u/Grievoushead)\
**Replies:** 8\
**Last updated:** [November 7, 2018, 12:06pm UTC](https://discuss.elastic.co/t/delete-by-query-refresh-wait-for-support/154118 "2018-11-07T12:06:44Z")

</div>

When I call delete\_by\_query with ?refresh=wait\_for, got this warning: \_delete\_by\_query/?refresh=wait\_for\] returned 1 warnings: \[299 Elasticsearch-5.4.1-2cfe0df "Expected a boolean \[true/false\] for request parameter \[ref…

---

## [Selecting an EC2 instans type for K8](https://discuss.elastic.co/t/selecting-an-ec2-instans-type-for-k8/155696)

<div class="topic-metadata">

**Author:** [@Martin\_H\_Andersen](https://discuss.elastic.co/u/Martin_H_Andersen)\
**Replies:** 0\
**Last updated:** [November 7, 2018, 10:21am UTC](https://discuss.elastic.co/t/selecting-an-ec2-instans-type-for-k8/155696 "2018-11-07T10:21:52Z")

</div>

Is it possible on AWS EKS to select a specific EC2 instance? I would like to use R4.large for my ES cluster. Does anyone in this forum has experiences with running ES on EKS?

---

## [Cannot import Java class](https://discuss.elastic.co/t/cannot-import-java-class/155649)

<div class="topic-metadata">

**Author:** [@Wa\_Tse](https://discuss.elastic.co/u/Wa_Tse)\
**Replies:** 5\
**Last updated:** [November 7, 2018, 9:42am UTC](https://discuss.elastic.co/t/cannot-import-java-class/155649 "2018-11-07T09:42:23Z")

</div>

When I try to test to connect to ElasticSearch using Java API, I cannot import the Java class. Then I try to use decomplier to check on the class file and exception is shown. I find the same problem in window zip and l…

---

## [Elasticsearch 6.2.4: how to get distinct values from multiple fields from ordered documents?](https://discuss.elastic.co/t/elasticsearch-6-2-4-how-to-get-distinct-values-from-multiple-fields-from-ordered-documents/155358)

<div class="topic-metadata">

**Author:** [@betty](https://discuss.elastic.co/u/betty)\
**Replies:** 8\
**Last updated:** [November 7, 2018, 9:23am UTC](https://discuss.elastic.co/t/elasticsearch-6-2-4-how-to-get-distinct-values-from-multiple-fields-from-ordered-documents/155358 "2018-11-07T09:23:29Z")

</div>

Below are the documents like: { "name": "Micheal", "title": "appliaction engeneer", "age": 30, "interest": "java", "manager": "Amily" }, { "name": "Georgiana", "title": "appliaction engeneer"…

---

## [When Adding replicas I recieve \`failed to list shard for shard\_store on node \` warning repeatedly](https://discuss.elastic.co/t/when-adding-replicas-i-recieve-failed-to-list-shard-for-shard-store-on-node-warning-repeatedly/155094)

<div class="topic-metadata">

**Author:** [@Shaun\_Stone](https://discuss.elastic.co/u/Shaun_Stone)\
**Replies:** 3\
**Last updated:** [November 7, 2018, 9:16am UTC](https://discuss.elastic.co/t/when-adding-replicas-i-recieve-failed-to-list-shard-for-shard-store-on-node-warning-repeatedly/155094 "2018-11-07T09:16:24Z")

</div>

we are using elasticsearch 6.3. i received this same WARN message when i restored from a snapshot and a separate time when I added extra replicas. exception: { "exception\_class": "org.elasticsearch.action.FailedNod…

---

## [X-Pack Basic License](https://discuss.elastic.co/t/x-pack-basic-license/155542)

<div class="topic-metadata">

**Author:** [@dawiro](https://discuss.elastic.co/u/dawiro)\
**Replies:** 5\
**Last updated:** [November 7, 2018, 9:09am UTC](https://discuss.elastic.co/t/x-pack-basic-license/155542 "2018-11-07T09:09:27Z")

</div>

Hi, Can someone point me to the url to download an x-pack 5.x basic license please? I'm running it on a trial atm which will expire in the next few days... Regards, D

---

## [The count and index\_total not same , why?](https://discuss.elastic.co/t/the-count-and-index-total-not-same-why/155639)

<div class="topic-metadata">

**Author:** [@zqc0512](https://discuss.elastic.co/u/zqc0512)\
**Replies:** 7\
**Last updated:** [November 7, 2018, 9:00am UTC](https://discuss.elastic.co/t/the-count-and-index-total-not-same-why/155639 "2018-11-07T09:00:30Z")

</div>

with cerebro show the index stats . i find the count and the index\_total not same.. { "\_shards": { "total": 84, "successful": 84, "failed": 0 }, "\_all": { "primaries": { "docs": { "…

---

## [Elasticsearch-certutil error](https://discuss.elastic.co/t/elasticsearch-certutil-error/155569)

<div class="topic-metadata">

**Author:** [@jacobot](https://discuss.elastic.co/u/jacobot)\
**Replies:** 8\
**Last updated:** [November 7, 2018, 8:53am UTC](https://discuss.elastic.co/t/elasticsearch-certutil-error/155569 "2018-11-07T08:53:10Z")

</div>

Hi, when I issue the command bin/elasticsearch-certutil cert -v --ca elastic-stack-ca.p12 I get following, what could be issue? Exception in thread "main" java.nio.file.NoSuchFileException: elastic-stack-ca.p12 …

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

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