# Elasticsearch

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

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

**Page:** 1405

---

## [Accessing fields from Watcher search condition](https://discuss.elastic.co/t/accessing-fields-from-watcher-search-condition/162473)

<div class="topic-metadata">

**Author:** [@Sanj](https://discuss.elastic.co/u/Sanj)\
**Replies:** 2\
**Last updated:** [January 24, 2019, 12:22pm UTC](https://discuss.elastic.co/t/accessing-fields-from-watcher-search-condition/162473 "2019-01-24T12:22:44Z")

</div>

Hi Team, I'm trying to develop a watcher comparing some fields from two different search conditions. Since I'm new to watcher, I could figure out exact way to access the fields of the records obtained from the search re…

---

## [Configure email alert action via docker environment variables](https://discuss.elastic.co/t/configure-email-alert-action-via-docker-environment-variables/166464)

<div class="topic-metadata">

**Author:** [@Sebastian\_Treu](https://discuss.elastic.co/u/Sebastian_Treu)\
**Replies:** 1\
**Last updated:** [February 5, 2019, 3:36pm UTC](https://discuss.elastic.co/t/configure-email-alert-action-via-docker-environment-variables/166464 "2019-02-05T15:36:36Z")

</div>

Hi, Is it possible to configure email settings via environment variables? Docs says: You configure the accounts Watcher can use to send email in the \>xpack.notification.email namespace in elasticsearch.yml . I kn…

---

## [Mysql server to elasticsearch](https://discuss.elastic.co/t/mysql-server-to-elasticsearch/167037)

<div class="topic-metadata">

**Author:** [@sahil\_ahmed](https://discuss.elastic.co/u/sahil_ahmed)\
**Replies:** 4\
**Last updated:** [February 5, 2019, 3:14pm UTC](https://discuss.elastic.co/t/mysql-server-to-elasticsearch/167037 "2019-02-05T15:14:53Z")

</div>

Hello, I am trying to input the data my sql server to the elasticsearch. i am running ELK in one server and mysql is in the other server they both are in the same network.I installed the mysql JDBC connector to the Serv…

---

## [Tools for troubleshooting performance issues](https://discuss.elastic.co/t/tools-for-troubleshooting-performance-issues/166032)

<div class="topic-metadata">

**Author:** [@zoldello](https://discuss.elastic.co/u/zoldello)\
**Replies:** 3\
**Last updated:** [February 5, 2019, 2:42pm UTC](https://discuss.elastic.co/t/tools-for-troubleshooting-performance-issues/166032 "2019-02-05T14:42:42Z")

</div>

What are tools I can use to troubleshoot performance issues with Elasticsearch? I need something that can take search queries and give me hints on why they are slow. It would be nice if it gives suggestions too.

---

## [Dangling index, not assigns shards in some nodes](https://discuss.elastic.co/t/dangling-index-not-assigns-shards-in-some-nodes/167122)

<div class="topic-metadata">

**Author:** [@Emiliano\_Baum](https://discuss.elastic.co/u/Emiliano_Baum)\
**Replies:** 5\
**Last updated:** [February 5, 2019, 2:05pm UTC](https://discuss.elastic.co/t/dangling-index-not-assigns-shards-in-some-nodes/167122 "2019-02-05T14:05:24Z")

</div>

After a network problem, the cluster stopped allocating fragments on 2 data nodes in my cluster. The cluster is composed of 3 ingest, 4 master and 6 data nodes, located in 2 different physical servers. This is explicit …

---

## [Unable to apply serviceAnnotations to elastic helm chart via values.yml](https://discuss.elastic.co/t/unable-to-apply-serviceannotations-to-elastic-helm-chart-via-values-yml/167130)

<div class="topic-metadata">

**Author:** [@murtaza1983](https://discuss.elastic.co/u/murtaza1983)\
**Replies:** 0\
**Last updated:** [February 5, 2019, 1:29pm UTC](https://discuss.elastic.co/t/unable-to-apply-serviceannotations-to-elastic-helm-chart-via-values-yml/167130 "2019-02-05T13:29:52Z")

</div>

trying to apply below annotations: serviceAnnotations: getambassador.io/config: | --- apiVersion: ambassador/v1 kind: Mapping name: elasticsearch-development\_mapping host: elasticsearch.dev.domain.…

---

## [Random score on nested query with inner hits](https://discuss.elastic.co/t/random-score-on-nested-query-with-inner-hits/167112)

<div class="topic-metadata">

**Author:** [@tomasn4a](https://discuss.elastic.co/u/tomasn4a)\
**Replies:** 0\
**Last updated:** [February 5, 2019, 11:56am UTC](https://discuss.elastic.co/t/random-score-on-nested-query-with-inner-hits/167112 "2019-02-05T11:56:54Z")

</div>

I am having trouble getting a random set of documents when performing a nested query with inner\_hits. I need the documents to be random, not the inner hits themselves. Here's the mapping for the examples: { "mappin…

---

## [Array intersection](https://discuss.elastic.co/t/array-intersection/167120)

<div class="topic-metadata">

**Author:** [@srikanthkadem](https://discuss.elastic.co/u/srikanthkadem)\
**Replies:** 2\
**Last updated:** [February 5, 2019, 12:47pm UTC](https://discuss.elastic.co/t/array-intersection/167120 "2019-02-05T12:47:10Z")

</div>

Hi , Can some one suggest me query for following scenario. My search cretiria is list of values \[1,2,3,4,5,6,7\] and ES will have data groups column as in row1--\>groups 1,2 in row2--\>groups 1,2,3 in row3 --\>groups 8…

---

## [Get count of string occurrence from an array in aggregation query](https://discuss.elastic.co/t/get-count-of-string-occurrence-from-an-array-in-aggregation-query/167117)

<div class="topic-metadata">

**Author:** [@Ijas\_ahamed](https://discuss.elastic.co/u/Ijas_ahamed)\
**Replies:** 0\
**Last updated:** [February 5, 2019, 12:21pm UTC](https://discuss.elastic.co/t/get-count-of-string-occurrence-from-an-array-in-aggregation-query/167117 "2019-02-05T12:21:21Z")

</div>

I have document of structure as below { user\_id: 'user\_id', tags: \['tag\_1', 'tag\_2', 'tag\_3', 'tag\_1'\], time: 123 // timestamp } I am using below query to get users having a set of tags, but result is returning acc…

---

## [How to insert into MySQL database and Elastic search same time](https://discuss.elastic.co/t/how-to-insert-into-mysql-database-and-elastic-search-same-time/167107)

<div class="topic-metadata">

**Author:** [@Pathum\_Kalhan](https://discuss.elastic.co/u/Pathum_Kalhan)\
**Replies:** 0\
**Last updated:** [February 5, 2019, 11:29am UTC](https://discuss.elastic.co/t/how-to-insert-into-mysql-database-and-elastic-search-same-time/167107 "2019-02-05T11:29:29Z")

</div>

Hi this is my first question in this forum. I am new to elastic search. :roll\_eyes: I have an express.js project. ORM is sequlize.js I have three tables. Category Item City I have search bar in mobile app w…

---

## [How are version conflicts during \_delete\_by\_query handled?](https://discuss.elastic.co/t/how-are-version-conflicts-during-delete-by-query-handled/167095)

<div class="topic-metadata">

**Author:** [@hzwaal](https://discuss.elastic.co/u/hzwaal)\
**Replies:** 2\
**Last updated:** [February 5, 2019, 11:26am UTC](https://discuss.elastic.co/t/how-are-version-conflicts-during-delete-by-query-handled/167095 "2019-02-05T11:26:53Z")

</div>

I have a question regarding \_delete\_by\_query and (internal) versioning: We're working with generational datasets, where a new generation obsoletes the previous one. A generation consists of around a million documents, e…

---

## [Please help figure out the right syntax](https://discuss.elastic.co/t/please-help-figure-out-the-right-syntax/167104)

<div class="topic-metadata">

**Author:** [@jurz](https://discuss.elastic.co/u/jurz)\
**Replies:** 0\
**Last updated:** [February 5, 2019, 11:06am UTC](https://discuss.elastic.co/t/please-help-figure-out-the-right-syntax/167104 "2019-02-05T11:06:19Z")

</div>

Hi, re-read search syntax post serveral times over - still unable to do what I need. Here's the situation: Gathering logs from windows event log, have lots iwth event id 4625 and in some cases the event\_data.TargetUser…

---

## [Regarding timeouts in query](https://discuss.elastic.co/t/regarding-timeouts-in-query/167102)

<div class="topic-metadata">

**Author:** [@dextermorgan](https://discuss.elastic.co/u/dextermorgan)\
**Replies:** 0\
**Last updated:** [February 5, 2019, 11:00am UTC](https://discuss.elastic.co/t/regarding-timeouts-in-query/167102 "2019-02-05T11:00:54Z")

</div>

Have a question regarding timeout field in query. Are the timeouts implemented at shard level or at query level ?

---

## [Does ES 5.2.2 work on SuSe15 OS?](https://discuss.elastic.co/t/does-es-5-2-2-work-on-suse15-os/166293)

<div class="topic-metadata">

**Author:** [@dheeru4java](https://discuss.elastic.co/u/dheeru4java)\
**Replies:** 3\
**Last updated:** [February 5, 2019, 10:05am UTC](https://discuss.elastic.co/t/does-es-5-2-2-work-on-suse15-os/166293 "2019-02-05T10:05:06Z")

</div>

Hi, We are using ES 5.2.2 which doesn't seems to be working on SuSe15 opertaing system. we are getting below error - java.lang.IllegalStateException: No match found at java.util.regex.Matcher.group(Matcher.java:536) ~…

---

## [Regexp Query - How to detect the beginning and the finish of a string?](https://discuss.elastic.co/t/regexp-query-how-to-detect-the-beginning-and-the-finish-of-a-string/167083)

<div class="topic-metadata">

**Author:** [@Wassim\_Ben\_Amor](https://discuss.elastic.co/u/Wassim_Ben_Amor)\
**Replies:** 3\
**Last updated:** [February 5, 2019, 10:01am UTC](https://discuss.elastic.co/t/regexp-query-how-to-detect-the-beginning-and-the-finish-of-a-string/167083 "2019-02-05T10:01:32Z")

</div>

Hello, The documentation says : If you want the regexp pattern to start at the beginning of the string or finish at the end of the string, then you have to anchor it specifically, using ^ to indicate the beginning …

---

## [Static data / metadata in an index](https://discuss.elastic.co/t/static-data-metadata-in-an-index/167066)

<div class="topic-metadata">

**Author:** [@nahiko2000](https://discuss.elastic.co/u/nahiko2000)\
**Replies:** 3\
**Last updated:** [February 5, 2019, 9:30am UTC](https://discuss.elastic.co/t/static-data-metadata-in-an-index/167066 "2019-02-05T09:30:49Z")

</div>

Hi! Is there a way to add something like static data or metadata to an index? I have some data (some fields) in my indices that ALWAYS get the same values. Is there a way to set this fields to some static / metadata fi…

---

## [Use Env variable causing Elasticsearch not to start](https://discuss.elastic.co/t/use-env-variable-causing-elasticsearch-not-to-start/167053)

<div class="topic-metadata">

**Author:** [@Hari\_Prasad](https://discuss.elastic.co/u/Hari_Prasad)\
**Replies:** 2\
**Last updated:** [February 5, 2019, 9:06am UTC](https://discuss.elastic.co/t/use-env-variable-causing-elasticsearch-not-to-start/167053 "2019-02-05T09:06:46Z")

</div>

I have added an env variable in elasticsearch.yml file as follows http.port: ${PORT} I am able to retrieve the value of this variable when I echo the value of the variable echo $PORT 9200 But the Elasticsearch do not…

---

## [Pipeline Aggregation for pivot on aggregation](https://discuss.elastic.co/t/pipeline-aggregation-for-pivot-on-aggregation/167074)

<div class="topic-metadata">

**Author:** [@ShawnClark](https://discuss.elastic.co/u/ShawnClark)\
**Replies:** 0\
**Last updated:** [February 5, 2019, 8:04am UTC](https://discuss.elastic.co/t/pipeline-aggregation-for-pivot-on-aggregation/167074 "2019-02-05T08:04:58Z")

</div>

Been searching around quite a bit to find a solution to my problem. Hopefully this is possible with ElasticSearch. I have this query: GET \_search { "query": { "bool": { "must": \[ {"exists" : { "field…

---

## [Doubt regarding the use of index templates and aliases](https://discuss.elastic.co/t/doubt-regarding-the-use-of-index-templates-and-aliases/167068)

<div class="topic-metadata">

**Author:** [@Praneet\_Khandelwal](https://discuss.elastic.co/u/Praneet_Khandelwal)\
**Replies:** 1\
**Last updated:** [February 5, 2019, 7:55am UTC](https://discuss.elastic.co/t/doubt-regarding-the-use-of-index-templates-and-aliases/167068 "2019-02-05T07:55:15Z")

</div>

I am new to elasticsearch and was playing around with index templates and aliases. I know that with the help of index templates, we can create new aliases when a new index is created. But does it also support if my alia…

---

## [Service start fail after Upgrade 5.6.12 to latest](https://discuss.elastic.co/t/service-start-fail-after-upgrade-5-6-12-to-latest/166968)

<div class="topic-metadata">

**Author:** [@Ronny\_Preiss](https://discuss.elastic.co/u/Ronny_Preiss)\
**Replies:** 4\
**Last updated:** [February 5, 2019, 7:43am UTC](https://discuss.elastic.co/t/service-start-fail-after-upgrade-5-6-12-to-latest/166968 "2019-02-05T07:43:08Z")

</div>

Hi @ all, :slight\_smile: I've updated ES from 5.6.12 to the latest version and can't start the service anymore. I've done this with the following steps: wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | …

---

## [spanNear queries Vs phrase match query in elasticsearch](https://discuss.elastic.co/t/spannear-queries-vs-phrase-match-query-in-elasticsearch/164990)

<div class="topic-metadata">

**Author:** [@Navneet\_Mathpal](https://discuss.elastic.co/u/Navneet_Mathpal)\
**Replies:** 1\
**Last updated:** [February 5, 2019, 6:42am UTC](https://discuss.elastic.co/t/spannear-queries-vs-phrase-match-query-in-elasticsearch/164990 "2019-02-05T06:42:47Z")

</div>

Hello, I was trying to use the phrase boost for the matching documents , the same way we do in solr ( we can specify pf , pf2 ,pf3 ) . Can we specify the same in elasticsearch ? I came across phrase query that can be …

---

## [Ansible Automation for an upgrade (5.611 to 6.5.4) of elasticsearch](https://discuss.elastic.co/t/ansible-automation-for-an-upgrade-5-611-to-6-5-4-of-elasticsearch/164789)

<div class="topic-metadata">

**Author:** [@smm](https://discuss.elastic.co/u/smm)\
**Replies:** 9\
**Last updated:** [February 5, 2019, 5:51am UTC](https://discuss.elastic.co/t/ansible-automation-for-an-upgrade-5-611-to-6-5-4-of-elasticsearch/164789 "2019-02-05T05:51:26Z")

</div>

Hi there, quick question to the community. If you make an elasticsearch upgrade manually you are prompted if you want to keep the defaults. Does somenone has a solution for this step when using Ansible? So, how can I em…

---

## [Elasticsearch as a primary DB and other questions](https://discuss.elastic.co/t/elasticsearch-as-a-primary-db-and-other-questions/167056)

<div class="topic-metadata">

**Author:** [@brolly759](https://discuss.elastic.co/u/brolly759)\
**Replies:** 2\
**Last updated:** [February 5, 2019, 5:07am UTC](https://discuss.elastic.co/t/elasticsearch-as-a-primary-db-and-other-questions/167056 "2019-02-05T05:07:00Z")

</div>

Fairly new to ES and Kibana. I started migrating some of our IoT Sensor data to ES. Currently 2.5 weeks of data is 17mil records. Currently we use SQL and I am looking at using ES as a primary DB. Here are my questions: …

---

## [Access Elasticsearch by Google Click to Deploy from GAE](https://discuss.elastic.co/t/access-elasticsearch-by-google-click-to-deploy-from-gae/166875)

<div class="topic-metadata">

**Author:** [@Callonski](https://discuss.elastic.co/u/Callonski)\
**Replies:** 1\
**Last updated:** [February 4, 2019, 11:38pm UTC](https://discuss.elastic.co/t/access-elasticsearch-by-google-click-to-deploy-from-gae/166875 "2019-02-04T23:38:55Z")

</div>

I'm trying access elasticsearch cluster on GKE from my project in GAE - flexible. Since I don't want an external load-balancer, I'm following this guide: https://cloud.google.com/kubernetes-engine/docs/how-to/internal-l…

---

## [How to find rolled indices Eligible to Shrink programmatically](https://discuss.elastic.co/t/how-to-find-rolled-indices-eligible-to-shrink-programmatically/166912)

<div class="topic-metadata">

**Author:** [@Eduardo](https://discuss.elastic.co/u/Eduardo)\
**Replies:** 5\
**Last updated:** [February 4, 2019, 8:55pm UTC](https://discuss.elastic.co/t/how-to-find-rolled-indices-eligible-to-shrink-programmatically/166912 "2019-02-04T20:55:22Z")

</div>

Trying to use curator to shrink any indices that have been rolled nightly. Any way to use the filtering in curator to identify a rolled index? I believe is\_write\_index is set to false but I'm having trouble finding tha…

---

## [Help with aggregation to identify dups](https://discuss.elastic.co/t/help-with-aggregation-to-identify-dups/165868)

<div class="topic-metadata">

**Author:** [@LucasV](https://discuss.elastic.co/u/LucasV)\
**Replies:** 2\
**Last updated:** [February 4, 2019, 10:18pm UTC](https://discuss.elastic.co/t/help-with-aggregation-to-identify-dups/165868 "2019-02-04T22:18:27Z")

</div>

Hey folks, I am hoping someone could help me figure this issue out. Been at it for a few days and feel like i have hit a wall. I'd really appreciate any help on this topic. Here is the issue - I am populating address r…

---

## [Setting "not\_analyzed" on an Index Field](https://discuss.elastic.co/t/setting-not-analyzed-on-an-index-field/167026)

<div class="topic-metadata">

**Author:** [@rudyamid](https://discuss.elastic.co/u/rudyamid)\
**Replies:** 2\
**Last updated:** [February 4, 2019, 9:33pm UTC](https://discuss.elastic.co/t/setting-not-analyzed-on-an-index-field/167026 "2019-02-04T21:33:56Z")

</div>

I'm trying to set a field not to be analyzed so I can search for "/" slashes (as in URL requests). After searching the past questions and on google, the answer seems to be to make the index "not\_analyzed". However, when…

---

## [Looking for much needed guidance](https://discuss.elastic.co/t/looking-for-much-needed-guidance/166754)

<div class="topic-metadata">

**Author:** [@michael.insua](https://discuss.elastic.co/u/michael.insua)\
**Replies:** 2\
**Last updated:** [February 4, 2019, 9:06pm UTC](https://discuss.elastic.co/t/looking-for-much-needed-guidance/166754 "2019-02-04T21:06:22Z")

</div>

I am using a web hosted data analytics application that has incorporated the Painless Expression function into it's process. While writing expressions is unfamiliar to me, I can understand what their purpose is and it se…

---

## [How to get distinct terms from multiple fields](https://discuss.elastic.co/t/how-to-get-distinct-terms-from-multiple-fields/166955)

<div class="topic-metadata">

**Author:** [@sesha](https://discuss.elastic.co/u/sesha)\
**Replies:** 4\
**Last updated:** [February 4, 2019, 7:39pm UTC](https://discuss.elastic.co/t/how-to-get-distinct-terms-from-multiple-fields/166955 "2019-02-04T19:39:05Z")

</div>

I need to get distinct cities from multiple fields using aggregations. { "originCity": "Moscow" "destCity": "Stockholm" } Thanks

---

## [Unexpected zero value](https://discuss.elastic.co/t/unexpected-zero-value/166804)

<div class="topic-metadata">

**Author:** [@carrot](https://discuss.elastic.co/u/carrot)\
**Replies:** 4\
**Last updated:** [February 4, 2019, 7:32pm UTC](https://discuss.elastic.co/t/unexpected-zero-value/166804 "2019-02-04T19:32:06Z")

</div>

I'm monitoring HTTP Status Code over time. Somehow the model built something for code "415". At some point in the past, we had some spikes of 415 but it disappeared as seen in this picture: Zoomed in what changed the …

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

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