# Elasticsearch

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

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

**Page:** 1479

---

## [Using python client to create snapshot fails - create a whole cluster snapshot](https://discuss.elastic.co/t/using-python-client-to-create-snapshot-fails-create-a-whole-cluster-snapshot/157396)

<div class="topic-metadata">

**Author:** [@rschirin](https://discuss.elastic.co/u/rschirin)\
**Replies:** 1\
**Last updated:** [November 20, 2018, 8:42am UTC](https://discuss.elastic.co/t/using-python-client-to-create-snapshot-fails-create-a-whole-cluster-snapshot/157396 "2018-11-20T08:42:29Z")

</div>

hi all, I'm trying to create the snapshot of a specific index using the python client. the last executed command is: es.snapshot.create(repository=repo,snapshot=snapshotname,wait\_for\_completion="true",body=settingsSna…

---

## [Index an image using ingest-attachment via Postman](https://discuss.elastic.co/t/index-an-image-using-ingest-attachment-via-postman/157472)

<div class="topic-metadata">

**Author:** [@ottadini](https://discuss.elastic.co/u/ottadini)\
**Replies:** 1\
**Last updated:** [November 20, 2018, 8:25am UTC](https://discuss.elastic.co/t/index-an-image-using-ingest-attachment-via-postman/157472 "2018-11-20T08:25:22Z")

</div>

I'm trying to test indexing a tiff image using the ingest-attachment plugin. First, does Elasticsearch's Tika implement parsers for image formats? I realise that they'll only get metadata, but that's all I want for now. …

---

## [Creating dashboard](https://discuss.elastic.co/t/creating-dashboard/157488)

<div class="topic-metadata">

**Author:** [@MaralErdene\_Tumursuh](https://discuss.elastic.co/u/MaralErdene_Tumursuh)\
**Replies:** 1\
**Last updated:** [November 20, 2018, 8:14am UTC](https://discuss.elastic.co/t/creating-dashboard/157488 "2018-11-20T08:14:32Z")

</div>

Hello folks, I would like to create dashboard including charts (such as pie, horizontal , vertical bar and other) from elastic search. I know kibana can do it. But i don't like the kibana user interface. I want to draw…

---

## [Elasticsearch sorting issue](https://discuss.elastic.co/t/elasticsearch-sorting-issue/157319)

<div class="topic-metadata">

**Author:** [@Jacques\_du\_Plessis](https://discuss.elastic.co/u/Jacques_du_Plessis)\
**Replies:** 2\
**Last updated:** [November 20, 2018, 6:37am UTC](https://discuss.elastic.co/t/elasticsearch-sorting-issue/157319 "2018-11-20T06:37:38Z")

</div>

Can someone please explain to me why I am getting such a random result when I sort my data. I am just doing a simple query, trying to return all the documents filtered my a companyId sorting my lastName in desc order. /…

---

## [\[o.e.a.s.TransportSearchAction\] \[node-1\] All shards failed for phase: \[query\]](https://discuss.elastic.co/t/o-e-a-s-transportsearchaction-node-1-all-shards-failed-for-phase-query/157463)

<div class="topic-metadata">

**Author:** [@Joer\_Gates](https://discuss.elastic.co/u/Joer_Gates)\
**Replies:** 7\
**Last updated:** [November 20, 2018, 6:27am UTC](https://discuss.elastic.co/t/o-e-a-s-transportsearchaction-node-1-all-shards-failed-for-phase-query/157463 "2018-11-20T06:27:17Z")

</div>

\[2018-11-20T11:25:56,873\]\[WARN \]\[o.e.x.m.e.l.LocalExporter\] unexpected error while indexing monitoring document org.elasticsearch.xpack.monitoring.exporter.ExportException: UnavailableShardsException\[\[.monitoring-es-6-20…

---

## [Unable to connect to elastic search server connection refused](https://discuss.elastic.co/t/unable-to-connect-to-elastic-search-server-connection-refused/157041)

<div class="topic-metadata">

**Author:** [@unnikrishnan\_b](https://discuss.elastic.co/u/unnikrishnan_b)\
**Replies:** 2\
**Last updated:** [November 20, 2018, 4:56am UTC](https://discuss.elastic.co/t/unable-to-connect-to-elastic-search-server-connection-refused/157041 "2018-11-20T04:56:57Z")

</div>

I'm unable to connect to elasticsearch server form my browser. Connection get refusing. There is no error in the log file see the following elastic search config file: \`# ======================== Elasticsearch Configu…

---

## [Elastic cluster in Kubernetes using statefulsets ,data lost during cluster restart](https://discuss.elastic.co/t/elastic-cluster-in-kubernetes-using-statefulsets-data-lost-during-cluster-restart/157264)

<div class="topic-metadata">

**Author:** [@Punith](https://discuss.elastic.co/u/Punith)\
**Replies:** 2\
**Last updated:** [November 20, 2018, 4:25am UTC](https://discuss.elastic.co/t/elastic-cluster-in-kubernetes-using-statefulsets-data-lost-during-cluster-restart/157264 "2018-11-20T04:25:37Z")

</div>

Hi, We have a Kubernetes statefulset Elastic cluster with 3 master nodes and 2 data nodes.Elastic version being 6.4.2.After a cluster restart none of the old data i.e indices are present and only new data is being displ…

---

## [Search C# NEST query on attachments](https://discuss.elastic.co/t/search-c-nest-query-on-attachments/156302)

<div class="topic-metadata">

**Author:** [@alina.frey](https://discuss.elastic.co/u/alina.frey)\
**Replies:** 3\
**Last updated:** [November 20, 2018, 3:04am UTC](https://discuss.elastic.co/t/search-c-nest-query-on-attachments/156302 "2018-11-20T03:04:00Z")

</div>

My goal is to be able to perform a search on the Content of a list of documents called PersonDocuments attached to IndexablePersonModel, and return the persons that have documents that contain the query term. The qu…

---

## [Curl command from terminal works however, php CURL doesnt pull the records](https://discuss.elastic.co/t/curl-command-from-terminal-works-however-php-curl-doesnt-pull-the-records/157268)

<div class="topic-metadata">

**Author:** [@Bishwadeep\_Kc](https://discuss.elastic.co/u/Bishwadeep_Kc)\
**Replies:** 0\
**Last updated:** [November 19, 2018, 5:24am UTC](https://discuss.elastic.co/t/curl-command-from-terminal-works-however-php-curl-doesnt-pull-the-records/157268 "2018-11-19T05:24:12Z")

</div>

I have the following php curl commands running on the same server where the ES is installed and running on port 9200. function($data\_string){ $ch = curl\_init('http://localhost:9200/cfaq/\_search'); curl\_setopt($ch, CUR…

---

## [Query that sum balance of different event](https://discuss.elastic.co/t/query-that-sum-balance-of-different-event/157055)

<div class="topic-metadata">

**Author:** [@Nikhil\_Nambiar](https://discuss.elastic.co/u/Nikhil_Nambiar)\
**Replies:** 2\
**Last updated:** [November 20, 2018, 2:25am UTC](https://discuss.elastic.co/t/query-that-sum-balance-of-different-event/157055 "2018-11-20T02:25:43Z")

</div>

Hi, I need a help on Elasticsearch query solution for an sql query select t1.\* from (select \* from abc where event=2003) as t1 inner join (select \* from abc where event =4012) as t2 on t1.c\_id=t2.c\_id where t1.bal…

---

## [Cannot evaluate org.elasticsearch.common.inject.InjectorImpl.toString()](https://discuss.elastic.co/t/cannot-evaluate-org-elasticsearch-common-inject-injectorimpl-tostring/156014)

<div class="topic-metadata">

**Author:** [@sevenfirezzz](https://discuss.elastic.co/u/sevenfirezzz)\
**Replies:** 4\
**Last updated:** [November 20, 2018, 1:15am UTC](https://discuss.elastic.co/t/cannot-evaluate-org-elasticsearch-common-inject-injectorimpl-tostring/156014 "2018-11-20T01:15:49Z")

</div>

I want to create a es client but I got a error like this: Method threw 'java.lang.StackOverflowError' exception. Cannot evaluate org.elasticsearch.common.inject.InjectorImpl.toString() This is my code: Settings se…

---

## [How can I use queryBuilders.wrapperQuery base64 encoded string](https://discuss.elastic.co/t/how-can-i-use-querybuilders-wrapperquery-base64-encoded-string/157260)

<div class="topic-metadata">

**Author:** [@byeong\_seok\_park](https://discuss.elastic.co/u/byeong_seok_park)\
**Replies:** 0\
**Last updated:** [November 19, 2018, 2:54am UTC](https://discuss.elastic.co/t/how-can-i-use-querybuilders-wrapperquery-base64-encoded-string/157260 "2018-11-19T02:54:52Z")

</div>

I have a json string to build a query, and I need to convert this to QueryBuilder. (ES Ver. 6.3.0) I found that I can use wrapperQuery method, so I wrote this code: String str = cond.getFilter().toString(); Que…

---

## [9 out of 42 shards failed](https://discuss.elastic.co/t/9-out-of-42-shards-failed/157442)

<div class="topic-metadata">

**Author:** [@Timshs](https://discuss.elastic.co/u/Timshs)\
**Replies:** 6\
**Last updated:** [November 20, 2018, 12:54am UTC](https://discuss.elastic.co/t/9-out-of-42-shards-failed/157442 "2018-11-20T00:54:09Z")

</div>

Have setup a dashboard but when loading this dashboard or the visualizations I get 9 out of 42 shards failed .. shortly as a popup in ELKSTACK 6.4.2. But the dashboard as well as the visualizations still shows fine. I H…

---

## [Problems upgrading from 6.2.4 to 6.4.3/6.5.0 in Elastic Cloud](https://discuss.elastic.co/t/problems-upgrading-from-6-2-4-to-6-4-3-6-5-0-in-elastic-cloud/157453)

<div class="topic-metadata">

**Author:** [@onzali](https://discuss.elastic.co/u/onzali)\
**Replies:** 1\
**Last updated:** [November 20, 2018, 12:45am UTC](https://discuss.elastic.co/t/problems-upgrading-from-6-2-4-to-6-4-3-6-5-0-in-elastic-cloud/157453 "2018-11-20T00:45:36Z")

</div>

Hi, I have an elastic cloud(AWS) cluster with three nodes running on version 6.2.4. I am trying to upgrade them to either versions 6.4.3 or 6.5.0. However, I keep getting the below error and I cannot find a solution to …

---

## [NEST async VS sync](https://discuss.elastic.co/t/nest-async-vs-sync/156427)

<div class="topic-metadata">

**Author:** [@yoav](https://discuss.elastic.co/u/yoav)\
**Replies:** 1\
**Last updated:** [November 20, 2018, 12:23am UTC](https://discuss.elastic.co/t/nest-async-vs-sync/156427 "2018-11-20T00:23:28Z")

</div>

Using NEST in .net core 2.1 Is there any reason not to use async calls? For example (SearchAsync, DeleteIndexAsync, BulkAsync) Should we always prefer async NEST methods over sync methods? Thanks

---

## [Elasticsearch random scoring with filters](https://discuss.elastic.co/t/elasticsearch-random-scoring-with-filters/157253)

<div class="topic-metadata">

**Author:** [@abeering](https://discuss.elastic.co/u/abeering)\
**Replies:** 1\
**Last updated:** [November 20, 2018, 12:15am UTC](https://discuss.elastic.co/t/elasticsearch-random-scoring-with-filters/157253 "2018-11-20T00:15:38Z")

</div>

I've got a situation, using ES 6.2, where I can either perform a bool or a random\_score , but not both at the same time. Here is one of those potential queries: { "from": 0, "size": 50, "query": { "function…

---

## [Shards and replicas allocation in elasticsearch](https://discuss.elastic.co/t/shards-and-replicas-allocation-in-elasticsearch/156770)

<div class="topic-metadata">

**Author:** [@iamlearner123](https://discuss.elastic.co/u/iamlearner123)\
**Replies:** 6\
**Last updated:** [November 19, 2018, 11:37pm UTC](https://discuss.elastic.co/t/shards-and-replicas-allocation-in-elasticsearch/156770 "2018-11-19T23:37:04Z")

</div>

Hi, i am new to Elasticsearch and still learning it . can i please how to calculate the number of shards and replicas required for an index ? i now that number factors should be considered but i am kind of confused afte…

---

## [Using max\_score inside script function](https://discuss.elastic.co/t/using-max-score-inside-script-function/156871)

<div class="topic-metadata">

**Author:** [@Oscar\_Sanchez\_Sanche](https://discuss.elastic.co/u/Oscar_Sanchez_Sanche)\
**Replies:** 3\
**Last updated:** [November 19, 2018, 11:22pm UTC](https://discuss.elastic.co/t/using-max-score-inside-script-function/156871 "2018-11-19T23:22:55Z")

</div>

Hi there I would like to run the following script with a function score query: "return \_score / max\_score;" However i'm getting the following result: { "error": { "root\_cause": \[ { "type": "script…

---

## [Issue with Elasticsearch Docker image](https://discuss.elastic.co/t/issue-with-elasticsearch-docker-image/156913)

<div class="topic-metadata">

**Author:** [@ddowling-act](https://discuss.elastic.co/u/ddowling-act)\
**Replies:** 3\
**Last updated:** [November 19, 2018, 10:30pm UTC](https://discuss.elastic.co/t/issue-with-elasticsearch-docker-image/156913 "2018-11-19T22:30:27Z")

</div>

I'm trying to use an elasticsearch docker image in a test, using the testcontainers library to manage spinning it up. When using the "5.6.4" image from "docker.elastic.co/elasticsearch/elasticsearch", it correctly repond…

---

## [6.1.1 histogram aggregation crashes and stops elasticsearch](https://discuss.elastic.co/t/6-1-1-histogram-aggregation-crashes-and-stops-elasticsearch/157452)

<div class="topic-metadata">

**Author:** [@linkerc](https://discuss.elastic.co/u/linkerc)\
**Replies:** 0\
**Last updated:** [November 19, 2018, 10:29pm UTC](https://discuss.elastic.co/t/6-1-1-histogram-aggregation-crashes-and-stops-elasticsearch/157452 "2018-11-19T22:29:11Z")

</div>

I'm experiencing "histogram" aggregation crashing 6.1.1 consistently. But I can't seem to find a bug relating to my observation. The closest I can find are a couple on 6.0.0. I'm wondering if anybody has experience si…

---

## [Slow results retrieval](https://discuss.elastic.co/t/slow-results-retrieval/157178)

<div class="topic-metadata">

**Author:** [@TDZ](https://discuss.elastic.co/u/TDZ)\
**Replies:** 4\
**Last updated:** [November 19, 2018, 9:21pm UTC](https://discuss.elastic.co/t/slow-results-retrieval/157178 "2018-11-19T21:21:24Z")

</div>

So I have 5 billion docs on 5 shards in 1 index, all on one machine, each shard has 1 segment. ES is running on 4 cpus with 26GB ram and 18GB of heap for ES. Each doc has 4 ints and 2 floats. Im running a query that u…

---

## [How to add sorting to multi bucket aggregation?](https://discuss.elastic.co/t/how-to-add-sorting-to-multi-bucket-aggregation/157440)

<div class="topic-metadata">

**Author:** [@tomm](https://discuss.elastic.co/u/tomm)\
**Replies:** 0\
**Last updated:** [November 19, 2018, 8:58pm UTC](https://discuss.elastic.co/t/how-to-add-sorting-to-multi-bucket-aggregation/157440 "2018-11-19T20:58:10Z")

</div>

Hi! I have some mapping with sample data, and also query aggregating that data, that works ALMOST like I want it - thanks to "size": 1 it gets me only one variant.. but I'd like it to get cheapest, so I'm missing sortin…

---

## [Return a set of values only on the first occurrence of one of them](https://discuss.elastic.co/t/return-a-set-of-values-only-on-the-first-occurrence-of-one-of-them/157239)

<div class="topic-metadata">

**Author:** [@Dany1](https://discuss.elastic.co/u/Dany1)\
**Replies:** 1\
**Last updated:** [November 19, 2018, 8:49pm UTC](https://discuss.elastic.co/t/return-a-set-of-values-only-on-the-first-occurrence-of-one-of-them/157239 "2018-11-19T20:49:55Z")

</div>

Hi all, I use the latest ES version. My data set is a network flow (see an exemple below). Each time a new host starts a flow with one other, a new and unique flow\_id is created. I would like to write an Elasticsearch r…

---

## [Problem communicating within nodes in cluster - send message failed, node gets removed from cluster](https://discuss.elastic.co/t/problem-communicating-within-nodes-in-cluster-send-message-failed-node-gets-removed-from-cluster/156736)

<div class="topic-metadata">

**Author:** [@elco\_comm1982](https://discuss.elastic.co/u/elco_comm1982)\
**Replies:** 10\
**Last updated:** [November 19, 2018, 7:48pm UTC](https://discuss.elastic.co/t/problem-communicating-within-nodes-in-cluster-send-message-failed-node-gets-removed-from-cluster/156736 "2018-11-19T19:48:39Z")

</div>

Hi, We keep seeing this issue intermittently in our cluster.. After the message failed error comes, the node gets removed from the cluster and the cluster state goes into red.. Immediately afterwards, the node gets ad…

---

## [About shards, nodes and cores](https://discuss.elastic.co/t/about-shards-nodes-and-cores/157190)

<div class="topic-metadata">

**Author:** [@lfv89](https://discuss.elastic.co/u/lfv89)\
**Replies:** 11\
**Last updated:** [November 19, 2018, 7:42pm UTC](https://discuss.elastic.co/t/about-shards-nodes-and-cores/157190 "2018-11-19T19:42:59Z")

</div>

I've been digging into Elastic's mechanism of shard distribution and I'd like to validate my understanding to see if I got something wrong or if there is something missing. With the aim of achieving a higher degree of p…

---

## [NoSuchMethodError for org.elasticsearch.action.search.SearchRequest.allowPartialSearchResults](https://discuss.elastic.co/t/nosuchmethoderror-for-org-elasticsearch-action-search-searchrequest-allowpartialsearchresults/157236)

<div class="topic-metadata">

**Author:** [@kma\_jinnahm](https://discuss.elastic.co/u/kma_jinnahm)\
**Replies:** 1\
**Last updated:** [November 19, 2018, 7:24pm UTC](https://discuss.elastic.co/t/nosuchmethoderror-for-org-elasticsearch-action-search-searchrequest-allowpartialsearchresults/157236 "2018-11-19T19:24:07Z")

</div>

I am writing a spring boot application to connect with elastic search. I am using "elasticsearch-rest-high-level-client" to connect with es. When I search doc using below code, I am getting NoSuchMethodError which is lis…

---

## [Elasticsearch indices stored on S3 mounted with S3FS](https://discuss.elastic.co/t/elasticsearch-indices-stored-on-s3-mounted-with-s3fs/157400)

<div class="topic-metadata">

**Author:** [@Zerobot](https://discuss.elastic.co/u/Zerobot)\
**Replies:** 8\
**Last updated:** [November 19, 2018, 6:34pm UTC](https://discuss.elastic.co/t/elasticsearch-indices-stored-on-s3-mounted-with-s3fs/157400 "2018-11-19T18:34:41Z")

</div>

Hi, So I've a really specific infrastructure where I need to store my "Older than 30 days" indices on COLD/WARM nodes. Those nodes have a S3 bucket (1 bucket for all 4 nodes) mounted as a filesystem on each node in /dat…

---

## [Return docs with specific value to the top and order the rest by rand](https://discuss.elastic.co/t/return-docs-with-specific-value-to-the-top-and-order-the-rest-by-rand/153041)

<div class="topic-metadata">

**Author:** [@Oscar\_Sanchez\_Sanche](https://discuss.elastic.co/u/Oscar_Sanchez_Sanche)\
**Replies:** 2\
**Last updated:** [November 19, 2018, 6:07pm UTC](https://discuss.elastic.co/t/return-docs-with-specific-value-to-the-top-and-order-the-rest-by-rand/153041 "2018-11-19T18:07:41Z")

</div>

Hi there, I would like ES to return documents that have a field is\_sticky with value true to the top on a match all query. The rest of the results that have a false value should be ordered by rand. Currently, I got the …

---

## [Migrating from Elastic 2 to 5](https://discuss.elastic.co/t/migrating-from-elastic-2-to-5/154353)

<div class="topic-metadata">

**Author:** [@praveenoma](https://discuss.elastic.co/u/praveenoma)\
**Replies:** 12\
**Last updated:** [November 19, 2018, 6:04pm UTC](https://discuss.elastic.co/t/migrating-from-elastic-2-to-5/154353 "2018-11-19T18:04:36Z")

</div>

We are migrating from Spring Boot 1.x (comes with Elastic 2) to Spring Boot 2.x (comes with Elastic 5) In Spring boot 1 (i.e Elastic 2), we've used the NodeBuilder api to create in memory nodes on demand. With Spr…

---

## [Automatically pushing PostgreSQL DB Server data to ES for indexing](https://discuss.elastic.co/t/automatically-pushing-postgresql-db-server-data-to-es-for-indexing/157397)

<div class="topic-metadata">

**Author:** [@kaushalshriyan](https://discuss.elastic.co/u/kaushalshriyan)\
**Replies:** 0\
**Last updated:** [November 19, 2018, 4:31pm UTC](https://discuss.elastic.co/t/automatically-pushing-postgresql-db-server-data-to-es-for-indexing/157397 "2018-11-19T16:31:07Z")

</div>

Hi, I am running PostgreSQL DB server( version 9.6.11) and pushing it to ES (version 6.5.0) for indexing. I usually run /usr/share/logstash/bin/logstash -f products-index-logstash.conf manually. Is there a way to automa…

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

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