# Elasticsearch

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

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

**Page:** 1983

---

## [DSL: Substracting Two Fields and List Top 10 with Highest Value](https://discuss.elastic.co/t/dsl-substracting-two-fields-and-list-top-10-with-highest-value/96741)

<div class="topic-metadata">

**Author:** [@gringo](https://discuss.elastic.co/u/gringo)\
**Replies:** 1\
**Last updated:** [August 11, 2017, 9:53am UTC](https://discuss.elastic.co/t/dsl-substracting-two-fields-and-list-top-10-with-highest-value/96741 "2017-08-11T09:53:58Z")

</div>

Anyone knows if DSL query can get do something like field “retail\_price” - “cost\_price” to get a field “profit” and return a list of top 10 products with most profits.

---

## [ElasticSearch TermVectors using Java](https://discuss.elastic.co/t/elasticsearch-termvectors-using-java/95731)

<div class="topic-metadata">

**Author:** [@Kyriakos](https://discuss.elastic.co/u/Kyriakos)\
**Replies:** 1\
**Last updated:** [August 11, 2017, 9:47am UTC](https://discuss.elastic.co/t/elasticsearch-termvectors-using-java/95731 "2017-08-11T09:47:54Z")

</div>

Hello, is this a way to do something like this using java ? GET /imdb/movies/\_termvectors { “doc”: { “plot”: “When wealthy industrialist Tony Stark is forced to build an armored suit after a life-threatening incident…

---

## [How do I write an ElasticSearch query to find unique elements in columns?](https://discuss.elastic.co/t/how-do-i-write-an-elasticsearch-query-to-find-unique-elements-in-columns/96361)

<div class="topic-metadata">

**Author:** [@TalKSicK333](https://discuss.elastic.co/u/TalKSicK333)\
**Replies:** 1\
**Last updated:** [August 11, 2017, 9:46am UTC](https://discuss.elastic.co/t/how-do-i-write-an-elasticsearch-query-to-find-unique-elements-in-columns/96361 "2017-08-11T09:46:21Z")

</div>

For example, if I have a SQL query: SELECT distinct emp\_id, salary FROM TABLE\_EMPLOYEE what would be its ElasticSearch equivalent? This is what I have come up with until now: { “aggs”: { “Employee”: { “terms”: { …

---

## [Getting exception - EngineCreationFailureException](https://discuss.elastic.co/t/getting-exception-enginecreationfailureexception/96437)

<div class="topic-metadata">

**Author:** [@prashant.bajpai](https://discuss.elastic.co/u/prashant.bajpai)\
**Replies:** 1\
**Last updated:** [August 11, 2017, 9:43am UTC](https://discuss.elastic.co/t/getting-exception-enginecreationfailureexception/96437 "2017-08-11T09:43:25Z")

</div>

Hi I am getting below exceptions repeatedly which is generating multi GBs of log files, and the disk get out of space very quickly. Caused by: \[logstash-2016.09.24\]\[\[logstash-2016.09.24\]\[4\]\] EngineCreationFailureExcept…

---

## [Problem in Elasticsearch Wildcard filtered Query](https://discuss.elastic.co/t/problem-in-elasticsearch-wildcard-filtered-query/96718)

<div class="topic-metadata">

**Author:** [@shaktigupta200](https://discuss.elastic.co/u/shaktigupta200)\
**Replies:** 5\
**Last updated:** [August 11, 2017, 9:36am UTC](https://discuss.elastic.co/t/problem-in-elasticsearch-wildcard-filtered-query/96718 "2017-08-11T09:36:16Z")

</div>

Hi all, I am trying to write elasticsearch wildcard filtered query for aggregation and below is what I have written. It is working fine but taking so long sometime more than a minute. But if I am searching through kiban…

---

## [Search – sync](https://discuss.elastic.co/t/search-sync/96306)

<div class="topic-metadata">

**Author:** [@AK1979](https://discuss.elastic.co/u/AK1979)\
**Replies:** 1\
**Last updated:** [August 11, 2017, 9:34am UTC](https://discuss.elastic.co/t/search-sync/96306 "2017-08-11T09:34:01Z")

</div>

Hi, Is there any option to perform a search in sync mode ( using elastic JS client) ? I’ve tried to use ‘await’ and other Jquery work around’s but with no luck so far. Maybe disable the async option with 3rd party lib…

---

## [Delete field from document](https://discuss.elastic.co/t/delete-field-from-document/96197)

<div class="topic-metadata">

**Author:** [@krishnaraj221193](https://discuss.elastic.co/u/krishnaraj221193)\
**Replies:** 1\
**Last updated:** [August 11, 2017, 9:26am UTC](https://discuss.elastic.co/t/delete-field-from-document/96197 "2017-08-11T09:26:14Z")

</div>

Hello sir, I have added a field in some document so i need to remove a field in all documents is there any way to do it in 1.7 elastic search

---

## [Elasticsearch java rest api - Sniffer issue](https://discuss.elastic.co/t/elasticsearch-java-rest-api-sniffer-issue/96147)

<div class="topic-metadata">

**Author:** [@amjad.hussain](https://discuss.elastic.co/u/amjad.hussain)\
**Replies:** 1\
**Last updated:** [August 11, 2017, 9:25am UTC](https://discuss.elastic.co/t/elasticsearch-java-rest-api-sniffer-issue/96147 "2017-08-11T09:25:31Z")

</div>

I am getting following exception. 2017-08-07 14:05:21,992 ERROR o.e.c.s.Sniffer \[pool-3-thread-1\] \[test- rest\] error while sniffing nodes javax.net.ssl.SSLPeerUnverifiedException: Host name ‘xx.xx.xx.xx’ does not match …

---

## [Dangling\_index\_imported](https://discuss.elastic.co/t/dangling-index-imported/96046)

<div class="topic-metadata">

**Author:** [@niraj\_kumar](https://discuss.elastic.co/u/niraj_kumar)\
**Replies:** 1\
**Last updated:** [August 11, 2017, 9:23am UTC](https://discuss.elastic.co/t/dangling-index-imported/96046 "2017-08-11T09:23:51Z")

</div>

How can i wipe of my entire elasticsearch. I am trying to delete all the data from my test elasticsearch. I can use the rest api to delete all of them and it says it worked. But after couple of minutes the shards seem to…

---

## [List the active users using login and logged out events](https://discuss.elastic.co/t/list-the-active-users-using-login-and-logged-out-events/96724)

<div class="topic-metadata">

**Author:** [@Hari17785](https://discuss.elastic.co/u/Hari17785)\
**Replies:** 5\
**Last updated:** [August 11, 2017, 9:16am UTC](https://discuss.elastic.co/t/list-the-active-users-using-login-and-logged-out-events/96724 "2017-08-11T09:16:54Z")

</div>

I want to list the number of active users in our web application using elastic search. Right now we are creating new documents whenever on login and logout event. using this document i want to derive number of active u…

---

## [Elasticsearch status is active and running but cant able to connect using curl](https://discuss.elastic.co/t/elasticsearch-status-is-active-and-running-but-cant-able-to-connect-using-curl/95897)

<div class="topic-metadata">

**Author:** [@joydipnath](https://discuss.elastic.co/u/joydipnath)\
**Replies:** 1\
**Last updated:** [August 11, 2017, 9:14am UTC](https://discuss.elastic.co/t/elasticsearch-status-is-active-and-running-but-cant-able-to-connect-using-curl/95897 "2017-08-11T09:14:45Z")

</div>

I got this status info by this command sudo /etc/init.d/elasticsearch status elasticsearch.service - Elasticsearch Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled) Active:…

---

## [Elastic search query using ranges](https://discuss.elastic.co/t/elastic-search-query-using-ranges/96735)

<div class="topic-metadata">

**Author:** [@Jyoti\_Shukla](https://discuss.elastic.co/u/Jyoti_Shukla)\
**Replies:** 0\
**Last updated:** [August 11, 2017, 9:07am UTC](https://discuss.elastic.co/t/elastic-search-query-using-ranges/96735 "2017-08-11T09:07:38Z")

</div>

I want to find out the number of shifts at 5 A.M in the july month. given the shif-time in date and time format.Example “ShiftTime” : “2017-06-14T06:00:00” and I am also having ShiftDate. Here what I have tried, “query…

---

## [Release date of ES 5.6.0](https://discuss.elastic.co/t/release-date-of-es-5-6-0/96701)

<div class="topic-metadata">

**Author:** [@dimalini](https://discuss.elastic.co/u/dimalini)\
**Replies:** 2\
**Last updated:** [August 11, 2017, 8:42am UTC](https://discuss.elastic.co/t/release-date-of-es-5-6-0/96701 "2017-08-11T08:42:48Z")

</div>

Hi, We want to consume “Highlighting Picks offset source for the unified highlighter directly from the es mapping #25747 (issue: #25699)” change in our ES, which as per the release notes is present in version 5.6.0 Any…

---

## [Building a project with elasticsearch](https://discuss.elastic.co/t/building-a-project-with-elasticsearch/96420)

<div class="topic-metadata">

**Author:** [@marwa](https://discuss.elastic.co/u/marwa)\
**Replies:** 4\
**Last updated:** [August 11, 2017, 8:32am UTC](https://discuss.elastic.co/t/building-a-project-with-elasticsearch/96420 "2017-08-11T08:32:46Z")

</div>

Hello, i am new in elasticsearch world , i wanna build a project with elastic stack but i don 't know what to use ! I need to perform calculation using multiple fields from multiple indexes then reuse those results in k…

---

## [Bounding box query with geohashes](https://discuss.elastic.co/t/bounding-box-query-with-geohashes/96729)

<div class="topic-metadata">

**Author:** [@tombaugh](https://discuss.elastic.co/u/tombaugh)\
**Replies:** 0\
**Last updated:** [August 11, 2017, 8:28am UTC](https://discuss.elastic.co/t/bounding-box-query-with-geohashes/96729 "2017-08-11T08:28:59Z")

</div>

Given the situation below, would a bounding box query with geohashes u0b and u0p return all points within the orange or the within the yellow rectangle?

---

## [Using Custom value for \_id instead of es generated value](https://discuss.elastic.co/t/using-custom-value-for--id-instead-of-es-generated-value/96540)

<div class="topic-metadata">

**Author:** [@jsbonline2007](https://discuss.elastic.co/u/jsbonline2007)\
**Replies:** 1\
**Last updated:** [August 11, 2017, 8:20am UTC](https://discuss.elastic.co/t/using-custom-value-for--id-instead-of-es-generated-value/96540 "2017-08-11T08:20:20Z")

</div>

Hi Team, We are implementing search on candidate data of about 10 mil records and we are planning to use candidate email ID as primary key for each record in elasticsearch. Can we use emailAddress as \_id in elasticsear…

---

## [Painless maxLoopCounter](https://discuss.elastic.co/t/painless-maxloopcounter/96692)

<div class="topic-metadata">

**Author:** [@nlds](https://discuss.elastic.co/u/nlds)\
**Replies:** 1\
**Last updated:** [August 11, 2017, 8:20am UTC](https://discuss.elastic.co/t/painless-maxloopcounter/96692 "2017-08-11T08:20:15Z")

</div>

Hi guys, I’m trying to build funnel using scripted\_metric aggregation. I got the error “painless script loop maximum number of statements limit”. I have to iterate through large number of events to count and calculate…

---

## [How to set the shards of Elasticsearch 5](https://discuss.elastic.co/t/how-to-set-the-shards-of-elasticsearch-5/96167)

<div class="topic-metadata">

**Author:** [@zqc0512](https://discuss.elastic.co/u/zqc0512)\
**Replies:** 20\
**Last updated:** [August 11, 2017, 8:19am UTC](https://discuss.elastic.co/t/how-to-set-the-shards-of-elasticsearch-5/96167 "2017-08-11T08:19:35Z")

</div>

how to set the number of shards about elasticsearch 5.4.2. ie: 100 nodes ,one node have 6 disk to es .how to set the number fo es index shards. thank.s

---

## [【query】multi\_match question in ES 5.5.0](https://discuss.elastic.co/t/query-multi-match-question-in-es-5-5-0/96709)

<div class="topic-metadata">

**Author:** [@felayman](https://discuss.elastic.co/u/felayman)\
**Replies:** 4\
**Last updated:** [August 11, 2017, 8:18am UTC](https://discuss.elastic.co/t/query-multi-match-question-in-es-5-5-0/96709 "2017-08-11T08:18:45Z")

</div>

When i try to use “multi\_match” in my project. I find a question what is not in line with my expectations. first,i post some data to the es cluster as follow: POST /blogs/blog/1 { "title":"elasticsearch match query"…

---

## [Bulk update The segment is too much ES5.4 version](https://discuss.elastic.co/t/bulk-update-the-segment-is-too-much-es5-4-version/96712)

<div class="topic-metadata">

**Author:** [@240475588](https://discuss.elastic.co/u/240475588)\
**Replies:** 1\
**Last updated:** [August 11, 2017, 8:13am UTC](https://discuss.elastic.co/t/bulk-update-the-segment-is-too-much-es5-4-version/96712 "2017-08-11T08:13:47Z")

</div>

Scenario is this: bulk update5000 data, have been running (per batch of 5000 continuously updated data) Found that segment produce dozens of hundreds of 10 KB per second (assuming I 10 MB per batch data, should not prod…

---

## [Chaining two queries, grouping and paritioning/windowing](https://discuss.elastic.co/t/chaining-two-queries-grouping-and-paritioning-windowing/95790)

<div class="topic-metadata">

**Author:** [@truekonrads](https://discuss.elastic.co/u/truekonrads)\
**Replies:** 1\
**Last updated:** [August 11, 2017, 7:59am UTC](https://discuss.elastic.co/t/chaining-two-queries-grouping-and-paritioning-windowing/95790 "2017-08-11T07:59:01Z")

</div>

Hello, I am investigating windows security logs. One query has identified a set of logins which contain a field - “Logon ID”. I would now like to have a second query chained/pipelined which finds all the log entries tha…

---

## [Perceived catch-22 during bootstrap of default passwords](https://discuss.elastic.co/t/perceived-catch-22-during-bootstrap-of-default-passwords/96527)

<div class="topic-metadata">

**Author:** [@martinr\_ubi](https://discuss.elastic.co/u/martinr_ubi)\
**Replies:** 1\
**Last updated:** [August 11, 2017, 7:24am UTC](https://discuss.elastic.co/t/perceived-catch-22-during-bootstrap-of-default-passwords/96527 "2017-08-11T07:24:17Z")

</div>

Hi, Currently running 5.4.3 dockerized (official images+ec2 disco plugin) on AWS Container Service (ECS). There is something I don't understand about best practices for bootstrapping the security aspect of xpack. (Cur…

---

## ["match\_phrase\_prefix" TooManyClauses\[maxClauseCount is set to 1024\]](https://discuss.elastic.co/t/match-phrase-prefix-toomanyclauses-maxclausecount-is-set-to-1024/95841)

<div class="topic-metadata">

**Author:** [@felayman](https://discuss.elastic.co/u/felayman)\
**Replies:** 4\
**Last updated:** [August 11, 2017, 6:56am UTC](https://discuss.elastic.co/t/match-phrase-prefix-toomanyclauses-maxclausecount-is-set-to-1024/95841 "2017-08-11T06:56:33Z")

</div>

when i use “match\_phrase\_prefix” query in my project. the query is : { "query": { "match\_phrase\_prefix": { "nickName": "a" } } } but it throws the exception as follow: org.elasticsearch.action.searc…

---

## [Sending Metricbeat Logs directly to Elasticsearch](https://discuss.elastic.co/t/sending-metricbeat-logs-directly-to-elasticsearch/95828)

<div class="topic-metadata">

**Author:** [@shrikantgulia](https://discuss.elastic.co/u/shrikantgulia)\
**Replies:** 1\
**Last updated:** [August 11, 2017, 6:48am UTC](https://discuss.elastic.co/t/sending-metricbeat-logs-directly-to-elasticsearch/95828 "2017-08-11T06:48:48Z")

</div>

I am having two Systems (System1 & System2). I am unable to collect metricbeat logs of System2 in the Elasticsearch of System1. My metricbeat.yml file configuration is as below Help would be really appreciated Tha…

---

## [Breaking change in cluster check in 5.x?](https://discuss.elastic.co/t/breaking-change-in-cluster-check-in-5-x/96239)

<div class="topic-metadata">

**Author:** [@weibin.wu](https://discuss.elastic.co/u/weibin.wu)\
**Replies:** 1\
**Last updated:** [August 11, 2017, 6:15am UTC](https://discuss.elastic.co/t/breaking-change-in-cluster-check-in-5-x/96239 "2017-08-11T06:15:15Z")

</div>

Hi Elasticsearch: We were using ES 2.4 in our production. We are now testing 5.x and planning on migration. However, we found that our SDK is using \[cluster\_endpoint\]/?timeout=1000 to check whether the cluster is exist…

---

## [How to index properties of GeoJson in geo\_shape type](https://discuss.elastic.co/t/how-to-index-properties-of-geojson-in-geo-shape-type/96322)

<div class="topic-metadata">

**Author:** [@Rohit\_Nigam](https://discuss.elastic.co/u/Rohit_Nigam)\
**Replies:** 1\
**Last updated:** [August 11, 2017, 6:11am UTC](https://discuss.elastic.co/t/how-to-index-properties-of-geojson-in-geo-shape-type/96322 "2017-08-11T06:11:10Z")

</div>

Hi I would like to index the properties in the GeoJson object as a part of geo\_shape type in elastic search. Any ideas how to do that. The GeoJson supports the object of type http://geojson.org/ { “type”: “Feature”, …

---

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

<div class="topic-metadata">

**Author:** [@Nikhil\_Jaiswal](https://discuss.elastic.co/u/Nikhil_Jaiswal)\
**Replies:** 7\
**Last updated:** [August 11, 2017, 5:33am UTC](https://discuss.elastic.co/t/elasticsearch-error/95762 "2017-08-11T05:33:51Z")

</div>

asacsdcscasa

---

## [Straight forward way to delete all doc](https://discuss.elastic.co/t/straight-forward-way-to-delete-all-doc/96002)

<div class="topic-metadata">

**Author:** [@Nithin\_Devang](https://discuss.elastic.co/u/Nithin_Devang)\
**Replies:** 1\
**Last updated:** [August 6, 2017, 11:22am UTC](https://discuss.elastic.co/t/straight-forward-way-to-delete-all-doc/96002 "2017-08-06T11:22:33Z")

</div>

Is there a straight forward way to delete all docs based on type. delete by query do not seem to be working.

---

## [o.e.b.Bootstrap \] \[sFoGO6h\] node validation exception \[1\] bootstrap checks failed](https://discuss.elastic.co/t/o-e-b-bootstrap-sfogo6h-node-validation-exception-1-bootstrap-checks-failed/96580)

<div class="topic-metadata">

**Author:** [@sankard](https://discuss.elastic.co/u/sankard)\
**Replies:** 1\
**Last updated:** [August 10, 2017, 10:23pm UTC](https://discuss.elastic.co/t/o-e-b-bootstrap-sfogo6h-node-validation-exception-1-bootstrap-checks-failed/96580 "2017-08-10T22:23:58Z")

</div>

Hi all, I am facing node validation error while starting elasticseach. Here is my debug log, I was not able find if i am missing any configuration. I’ve configured limit.conf and jvm with proper values \[2017-08-10T09:1…

---

## [Any tips? Span\_near with nested documents](https://discuss.elastic.co/t/any-tips-span-near-with-nested-documents/96678)

<div class="topic-metadata">

**Author:** [@dustyob](https://discuss.elastic.co/u/dustyob)\
**Replies:** 1\
**Last updated:** [August 10, 2017, 9:55pm UTC](https://discuss.elastic.co/t/any-tips-span-near-with-nested-documents/96678 "2017-08-10T21:55:56Z")

</div>

Hi, I’ve tried searching, to no avail. What I want to do is to find documents that contain nested documents, each with different properties, in-order. E.g. I would like to find documents with nestedthings.myid=nested1 …

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

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