# Elasticsearch

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

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

**Page:** 1842

---

## [How to count the quantity of documents?](https://discuss.elastic.co/t/how-to-count-the-quantity-of-documents/113522)

<div class="topic-metadata">

**Author:** [@f26227279](https://discuss.elastic.co/u/f26227279)\
**Replies:** 4\
**Last updated:** [December 30, 2017, 11:15am UTC](https://discuss.elastic.co/t/how-to-count-the-quantity-of-documents/113522 "2017-12-30T11:15:06Z")

</div>

this is my restful api: I want to sum the document(total),besides the protocol 17 and 6 . How can I do. "Udp|Tcp" : { "terms" : { "field" : "PROTOCOL", "include" : \["17", "6"\] } } response: "Udp|Tcp": { "doc\_c…

---

## [Elasticsearch sizing](https://discuss.elastic.co/t/elasticsearch-sizing/113626)

<div class="topic-metadata">

**Author:** [@StianOvrevage](https://discuss.elastic.co/u/StianOvrevage)\
**Replies:** 2\
**Last updated:** [December 30, 2017, 9:34am UTC](https://discuss.elastic.co/t/elasticsearch-sizing/113626 "2017-12-30T09:34:04Z")

</div>

I have tried for three weeks now to get a ES node/cluster to be able to ingest about 80.000 documents in bulk without crashing. I recieve the documents with Logstash before sending them to ES. I have 1 data node with 2…

---

## [How to filter specific field from elastic search](https://discuss.elastic.co/t/how-to-filter-specific-field-from-elastic-search/113141)

<div class="topic-metadata">

**Author:** [@muthu\_kutty](https://discuss.elastic.co/u/muthu_kutty)\
**Replies:** 2\
**Last updated:** [December 30, 2017, 9:17am UTC](https://discuss.elastic.co/t/how-to-filter-specific-field-from-elastic-search/113141 "2017-12-30T09:17:54Z")

</div>

Is it possible to filter only specific field not full documents from elastic search. sample data. { "took": 65, "timed\_out": false, "\_shards": { "total": 5, "successful": 5, "skipped": 0, "failed": 0 }, "hits"…

---

## [Match\_phrase isn't precise](https://discuss.elastic.co/t/match-phrase-isnt-precise/113569)

<div class="topic-metadata">

**Author:** [@f26227279](https://discuss.elastic.co/u/f26227279)\
**Replies:** 2\
**Last updated:** [December 30, 2017, 8:50am UTC](https://discuss.elastic.co/t/match-phrase-isnt-precise/113569 "2017-12-30T08:50:20Z")

</div>

this is my REST API: GET logstash-2017.12.29/\_search { "\_source": { "includes": \[ "IPV4\_DST\_ADDR","IPV4\_SRC\_ADDR","IN\_BYTES","OUT\_BYTES"\] }, "size" : 100, "query": { "bool": { "should": \[ { "match\_phrase…

---

## [Failed to restore snapshot to ES 5.5 with SearchGuard](https://discuss.elastic.co/t/failed-to-restore-snapshot-to-es-5-5-with-searchguard/113548)

<div class="topic-metadata">

**Author:** [@law](https://discuss.elastic.co/u/law)\
**Replies:** 5\
**Last updated:** [December 30, 2017, 6:24am UTC](https://discuss.elastic.co/t/failed-to-restore-snapshot-to-es-5-5-with-searchguard/113548 "2017-12-30T06:24:08Z")

</div>

hello everyone, I'm using elasticsearch 5.5.1 with SearchGurd. I want to backup my indices, that's ok. it's done now. But when i want to restore this snapshot, there is an error: {"error":{"root\_cause":\[{"type":"not\_x…

---

## [Elasticsearch process dead and http request stuck](https://discuss.elastic.co/t/elasticsearch-process-dead-and-http-request-stuck/113622)

<div class="topic-metadata">

**Author:** [@zhaosi](https://discuss.elastic.co/u/zhaosi)\
**Replies:** 0\
**Last updated:** [December 30, 2017, 4:13am UTC](https://discuss.elastic.co/t/elasticsearch-process-dead-and-http-request-stuck/113622 "2017-12-30T04:13:15Z")

</div>

I am running a 10 nodes es cluster, and everything is ok. yesterday I add 8 new nodes to the cluster, the new nodes work well at beginning, but after several hours later, all the new nodes disconnected from the cluster, …

---

## [Sorting on Integer field whose values are not the same length](https://discuss.elastic.co/t/sorting-on-integer-field-whose-values-are-not-the-same-length/112373)

<div class="topic-metadata">

**Author:** [@bswingle](https://discuss.elastic.co/u/bswingle)\
**Replies:** 3\
**Last updated:** [December 29, 2017, 11:34pm UTC](https://discuss.elastic.co/t/sorting-on-integer-field-whose-values-are-not-the-same-length/112373 "2017-12-29T23:34:25Z")

</div>

Hello All, My elastic search index has about 325K records in it of data I've crawled over time and is no longer available publicly. I have an integer field (So i can use range) containing the items price. I'm having an …

---

## [\[Elasticsearch 5.4.x\] Return additional data when using aggregations?](https://discuss.elastic.co/t/elasticsearch-5-4-x-return-additional-data-when-using-aggregations/113243)

<div class="topic-metadata">

**Author:** [@west415](https://discuss.elastic.co/u/west415)\
**Replies:** 2\
**Last updated:** [December 29, 2017, 9:48pm UTC](https://discuss.elastic.co/t/elasticsearch-5-4-x-return-additional-data-when-using-aggregations/113243 "2017-12-29T21:48:12Z")

</div>

Hi, I am currently using the bucket aggregation functionality in Elastic and it's working fine, but wanted to know if there is a way to return additional data dynamically as part of the aggregation results. I have this…

---

## [ELK migration from executable to service on windows](https://discuss.elastic.co/t/elk-migration-from-executable-to-service-on-windows/113604)

<div class="topic-metadata">

**Author:** [@AshishC](https://discuss.elastic.co/u/AshishC)\
**Replies:** 2\
**Last updated:** [December 29, 2017, 8:58pm UTC](https://discuss.elastic.co/t/elk-migration-from-executable-to-service-on-windows/113604 "2017-12-29T20:58:38Z")

</div>

Hi All, I have installed elasticsearch (unzip the zip installer and running it using cmd ) on windows server and started using it since last 2 weeks. But now, I would like to run it as service rather than running it fr…

---

## [Deprecation message: getDate is no longer necessary on date fields](https://discuss.elastic.co/t/deprecation-message-getdate-is-no-longer-necessary-on-date-fields/113611)

<div class="topic-metadata">

**Author:** [@VickyHarp](https://discuss.elastic.co/u/VickyHarp)\
**Replies:** 1\
**Last updated:** [December 29, 2017, 8:24pm UTC](https://discuss.elastic.co/t/deprecation-message-getdate-is-no-longer-necessary-on-date-fields/113611 "2017-12-29T20:24:35Z")

</div>

I am receiving the deprecation message "getDate is no longer necessary on date fields" on the following: POST \_scripts/test-date { "script": { "lang": "painless", "source": "doc\['starttime'\].date.hourOfDay \< p…

---

## [Index creation Error](https://discuss.elastic.co/t/index-creation-error/113505)

<div class="topic-metadata">

**Author:** [@Anumod](https://discuss.elastic.co/u/Anumod)\
**Replies:** 1\
**Last updated:** [December 29, 2017, 6:00pm UTC](https://discuss.elastic.co/t/index-creation-error/113505 "2017-12-29T18:00:02Z")

</div>

Hi , We have 2 JG servers(NE & NW) each with Elastic search instances. Index created on NE JG server, Backend - cassandra cluster index creation qry- gremlin\> mgmt.buildIndex(‘typeAndName’,Vertex.class).addKey(type,…

---

## [Snapshot -Internal server Error](https://discuss.elastic.co/t/snapshot-internal-server-error/112821)

<div class="topic-metadata">

**Author:** [@sivakaran](https://discuss.elastic.co/u/sivakaran)\
**Replies:** 1\
**Last updated:** [December 29, 2017, 4:03pm UTC](https://discuss.elastic.co/t/snapshot-internal-server-error/112821 "2017-12-29T16:03:08Z")

</div>

Hi team, while snapshot Completed state, we found some internal server error occurs. In particular node, If the primary shards are available means It leads to internal server error. I checked with configuration it se…

---

## [Using elasticsearch-spark to write data to elasticsearch throws exception](https://discuss.elastic.co/t/using-elasticsearch-spark-to-write-data-to-elasticsearch-throws-exception/113600)

<div class="topic-metadata">

**Author:** [@hanbj](https://discuss.elastic.co/u/hanbj)\
**Replies:** 0\
**Last updated:** [December 29, 2017, 3:22pm UTC](https://discuss.elastic.co/t/using-elasticsearch-spark-to-write-data-to-elasticsearch-throws-exception/113600 "2017-12-29T15:22:18Z")

</div>

Hi, all. Using elasticsearch-spark to write data to elasticsearch throws exception: There are 8 nodes in my cluster. Through monitoring, we see that the pressure of the cluster is not large and the machine load is goo…

---

## [Sorting on an unmapped nested field throws an error](https://discuss.elastic.co/t/sorting-on-an-unmapped-nested-field-throws-an-error/112783)

<div class="topic-metadata">

**Author:** [@clackner](https://discuss.elastic.co/u/clackner)\
**Replies:** 1\
**Last updated:** [December 29, 2017, 12:43pm UTC](https://discuss.elastic.co/t/sorting-on-an-unmapped-nested-field-throws-an-error/112783 "2017-12-29T12:43:25Z")

</div>

Hi! I'm trying to sort on unmapped nested fields. Due to our dynamic\_template i run into the issue, that i do not have the specific nested field mapping until that field get's indexed in the feature. Searching / etc. …

---

## [Update documents with reindex](https://discuss.elastic.co/t/update-documents-with-reindex/112874)

<div class="topic-metadata">

**Author:** [@gilisade](https://discuss.elastic.co/u/gilisade)\
**Replies:** 1\
**Last updated:** [December 29, 2017, 12:14pm UTC](https://discuss.elastic.co/t/update-documents-with-reindex/112874 "2017-12-29T12:14:52Z")

</div>

Hi all I have an index which contains the fields likes and reviews. We load the index using jdbc input with logstash. Every night we need to delete the index and reload it from the Oracle db. But we need to keep the …

---

## [Unable to Connect to Elasticsearch 6.1.0 via the javaclient](https://discuss.elastic.co/t/unable-to-connect-to-elasticsearch-6-1-0-via-the-javaclient/112358)

<div class="topic-metadata">

**Author:** [@pallavJha](https://discuss.elastic.co/u/pallavJha)\
**Replies:** 7\
**Last updated:** [December 25, 2017, 6:57pm UTC](https://discuss.elastic.co/t/unable-to-connect-to-elasticsearch-6-1-0-via-the-javaclient/112358 "2017-12-25T18:57:01Z")

</div>

I'm able to connect to elastic search 6.1.0 and index, update, delete and query the documents via cURL and plugin head but I'm unable to connect to the same via the java client, i.e, /\*\* \* Elasticsearch \*/…

---

## [Query with has\_parent vs denormalized with lots of updates](https://discuss.elastic.co/t/query-with-has-parent-vs-denormalized-with-lots-of-updates/112835)

<div class="topic-metadata">

**Author:** [@hello](https://discuss.elastic.co/u/hello)\
**Replies:** 1\
**Last updated:** [December 29, 2017, 11:39am UTC](https://discuss.elastic.co/t/query-with-has-parent-vs-denormalized-with-lots-of-updates/112835 "2017-12-29T11:39:42Z")

</div>

Maybe some of you have some experience with this. Currently my index has a has\_parent relationship of 1 parent to many children (roughly 200 children on average per parent). This unfortunately leads queries to be slow,…

---

## [Modeling dynamic fields and custom scoring](https://discuss.elastic.co/t/modeling-dynamic-fields-and-custom-scoring/113576)

<div class="topic-metadata">

**Author:** [@IanRC72](https://discuss.elastic.co/u/IanRC72)\
**Replies:** 0\
**Last updated:** [December 29, 2017, 11:28am UTC](https://discuss.elastic.co/t/modeling-dynamic-fields-and-custom-scoring/113576 "2017-12-29T11:28:51Z")

</div>

Hello all! I have a rather complex requirement that I'd love some advice on. I am new to Elasticsearch, but I have spent a few weeks studying the docs, some case study blogs, and experimenting. First, my documents' con…

---

## [Access to Elasticsearch data from an ingest plugin](https://discuss.elastic.co/t/access-to-elasticsearch-data-from-an-ingest-plugin/113019)

<div class="topic-metadata">

**Author:** [@uderline](https://discuss.elastic.co/u/uderline)\
**Replies:** 2\
**Last updated:** [December 29, 2017, 10:56am UTC](https://discuss.elastic.co/t/access-to-elasticsearch-data-from-an-ingest-plugin/113019 "2017-12-29T10:56:50Z")

</div>

Hello, Using @dadoonet's article on how to make an ingest plugin in Elasticsearch 5.6, I want to be able to use Duke in a ES plugin. Basically, I integrated Duke-core to the ingest plugin I am programming. The main goa…

---

## [Update By Query leads to "lang cannot be specified for stored scripts"](https://discuss.elastic.co/t/update-by-query-leads-to-lang-cannot-be-specified-for-stored-scripts/112686)

<div class="topic-metadata">

**Author:** [@jughead](https://discuss.elastic.co/u/jughead)\
**Replies:** 1\
**Last updated:** [December 29, 2017, 10:51am UTC](https://discuss.elastic.co/t/update-by-query-leads-to-lang-cannot-be-specified-for-stored-scripts/112686 "2017-12-29T10:51:08Z")

</div>

Version: Elasticsearch 6.0.0 POST \_scripts/blablabla { "script": { "source": "ctx.\_source.field2 = params.t.field2", "lang": "painless" } } PUT test/foo/1 { "user\_id": 10, "field1": "value1", "field2":…

---

## [How to merge the two query syntax](https://discuss.elastic.co/t/how-to-merge-the-two-query-syntax/113540)

<div class="topic-metadata">

**Author:** [@f26227279](https://discuss.elastic.co/u/f26227279)\
**Replies:** 6\
**Last updated:** [December 29, 2017, 10:37am UTC](https://discuss.elastic.co/t/how-to-merge-the-two-query-syntax/113540 "2017-12-29T10:37:49Z")

</div>

I have two syntax to query, and I want to merge them together, so I need only query one time . How can I do it? this is my restful api: GET \_search { "size" : 0, "query": { "bool": { "must": \[ { "match" …

---

## [Elasticsearch service fails to start](https://discuss.elastic.co/t/elasticsearch-service-fails-to-start/113470)

<div class="topic-metadata">

**Author:** [@ShilpiRachna](https://discuss.elastic.co/u/ShilpiRachna)\
**Replies:** 3\
**Last updated:** [December 29, 2017, 10:04am UTC](https://discuss.elastic.co/t/elasticsearch-service-fails-to-start/113470 "2017-12-29T10:04:27Z")

</div>

We are using Elasticsearch version 5.4.1 on Windows 10. We have an automation that does the following: Installs Java at a known location (JAVA\_HOME is always defined in System environment variable) Install Elastic…

---

## [How does the \`default\_operator\` of QueryString really work with \`multi field\` in ES 6.1? Does it change the \`OR clause\` between the fields?](https://discuss.elastic.co/t/how-does-the-default-operator-of-querystring-really-work-with-multi-field-in-es-6-1-does-it-change-the-or-clause-between-the-fields/113560)

<div class="topic-metadata">

**Author:** [@aiflu](https://discuss.elastic.co/u/aiflu)\
**Replies:** 1\
**Last updated:** [December 29, 2017, 10:02am UTC](https://discuss.elastic.co/t/how-does-the-default-operator-of-querystring-really-work-with-multi-field-in-es-6-1-does-it-change-the-or-clause-between-the-fields/113560 "2017-12-29T10:02:05Z")

</div>

Hello, I'm updating my project from ES 2.3 to ES 6.1. I feel confused about the algorithm of QueryString with default\_operator and fields. My purpose is to search in the fields city.name and zipcode.raw with one query l…

---

## [Filtering by Range](https://discuss.elastic.co/t/filtering-by-range/113410)

<div class="topic-metadata">

**Author:** [@Robert\_Naccache](https://discuss.elastic.co/u/Robert_Naccache)\
**Replies:** 4\
**Last updated:** [December 29, 2017, 8:49am UTC](https://discuss.elastic.co/t/filtering-by-range/113410 "2017-12-29T08:49:50Z")

</div>

Good Morning and Happy Holidays! I would like to ask a question, maybe someone can shed some light. I'm Pulling data from a database which contains a time stamp. What i'm trying to do is return all data where the time…

---

## [Query DSL for MoM, YoY, WoW calculation](https://discuss.elastic.co/t/query-dsl-for-mom-yoy-wow-calculation/113480)

<div class="topic-metadata">

**Author:** [@dheeran](https://discuss.elastic.co/u/dheeran)\
**Replies:** 1\
**Last updated:** [December 29, 2017, 8:42am UTC](https://discuss.elastic.co/t/query-dsl-for-mom-yoy-wow-calculation/113480 "2017-12-29T08:42:24Z")

</div>

Hi, I'm in situation to calculate MoM, YoY, WoW for a metric. I'm thinking of fetching all the docs and filtering in programming language. But I feel its not a right way. Can some one help me in forming Query DSL so tha…

---

## [Term aggregation shard level aggreagation issue](https://discuss.elastic.co/t/term-aggregation-shard-level-aggreagation-issue/113493)

<div class="topic-metadata">

**Author:** [@ankur\_singla](https://discuss.elastic.co/u/ankur_singla)\
**Replies:** 1\
**Last updated:** [December 29, 2017, 8:37am UTC](https://discuss.elastic.co/t/term-aggregation-shard-level-aggreagation-issue/113493 "2017-12-29T08:37:27Z")

</div>

As explained in documentation term aggregation can't be correct as internally elastic search using shard level aggregation. is there any way to ensure that this issue should not comes up.

---

## [How to display other count of genres](https://discuss.elastic.co/t/how-to-display-other-count-of-genres/113384)

<div class="topic-metadata">

**Author:** [@f26227279](https://discuss.elastic.co/u/f26227279)\
**Replies:** 3\
**Last updated:** [December 29, 2017, 8:35am UTC](https://discuss.elastic.co/t/how-to-display-other-count-of-genres/113384 "2017-12-29T08:35:21Z")

</div>

Hi everyone, I use genres syntax to query L7\_PROTO\_NAME and count their in\_bytes. it output the top ten in\_bytes L7\_PROTO\_NAME, then I want to get the top nine L7\_PROTO\_NAME and "others" . How could I do ? this is my r…

---

## [No Reporting in X-pack](https://discuss.elastic.co/t/no-reporting-in-x-pack/113531)

<div class="topic-metadata">

**Author:** [@wcqli](https://discuss.elastic.co/u/wcqli)\
**Replies:** 6\
**Last updated:** [December 29, 2017, 8:11am UTC](https://discuss.elastic.co/t/no-reporting-in-x-pack/113531 "2017-12-29T08:11:27Z")

</div>

Hi, my colleague helped me installed X-PACK for our KIBANA(5.4.3) to experience some new features. I asked him to install the basic version of X-PACK. I can see module "Monitoring" & "Timelion" on the KIBANA UI, but I c…

---

## [Make sure all async requests have been completed](https://discuss.elastic.co/t/make-sure-all-async-requests-have-been-completed/113346)

<div class="topic-metadata">

**Author:** [@prakharjain17](https://discuss.elastic.co/u/prakharjain17)\
**Replies:** 2\
**Last updated:** [December 29, 2017, 7:33am UTC](https://discuss.elastic.co/t/make-sure-all-async-requests-have-been-completed/113346 "2017-12-29T07:33:57Z")

</div>

Hi, I am using Java high level rest client to search for hundreds of products stored in elastic search. I am using term query. Since, there are hundreds of products that needs to be searched, I have used async request…

---

## [Revert BASIC to TRIAL license](https://discuss.elastic.co/t/revert-basic-to-trial-license/113441)

<div class="topic-metadata">

**Author:** [@Tommaso\_Mascioli](https://discuss.elastic.co/u/Tommaso_Mascioli)\
**Replies:** 1\
**Last updated:** [December 29, 2017, 7:20am UTC](https://discuss.elastic.co/t/revert-basic-to-trial-license/113441 "2017-12-29T07:20:22Z")

</div>

Dears, yesterday I installed the x-pack. I saw old metricbeat index in yellow, in order to try to repair the issue, I installed the BASIC license. Consequently, I obtained: lose the XPACK features that I would like to…

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

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