# Elasticsearch

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

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

**Page:** 544

---

## [I need a ES Query equalent to sql count(if(somecondition))](https://discuss.elastic.co/t/i-need-a-es-query-equalent-to-sql-count-if-somecondition/288877)

<div class="topic-metadata">

**Author:** [@Brintha](https://discuss.elastic.co/u/Brintha)\
**Replies:** 4\
**Last updated:** [November 11, 2021, 7:23am UTC](https://discuss.elastic.co/t/i-need-a-es-query-equalent-to-sql-count-if-somecondition/288877 "2021-11-11T07:23:04Z")

</div>

Hello, My Question is How to frame Query for 'SELECT EMPLOYEE,COUNT(IF(COUNTRY IN US)) FROM ORG WHERE SOMECRITERIA'

---

## [SQL - having equivalent query strategy](https://discuss.elastic.co/t/sql-having-equivalent-query-strategy/288954)

<div class="topic-metadata">

**Author:** [@SaitejaParsi](https://discuss.elastic.co/u/SaitejaParsi)\
**Replies:** 0\
**Last updated:** [November 11, 2021, 6:48am UTC](https://discuss.elastic.co/t/sql-having-equivalent-query-strategy/288954 "2021-11-11T06:48:09Z")

</div>

Hi, I have the following query to be converted to DSL and executed on ES. I could not find a suitable aggregation and filter over results of aggregation available out-of-the-box in ES. As an alternative, I am fetching th…

---

## [Don't import duplicates in nested objects](https://discuss.elastic.co/t/dont-import-duplicates-in-nested-objects/288952)

<div class="topic-metadata">

**Author:** [@Lazaro\_O\_Farrill](https://discuss.elastic.co/u/Lazaro_O_Farrill)\
**Replies:** 0\
**Last updated:** [November 11, 2021, 6:27am UTC](https://discuss.elastic.co/t/dont-import-duplicates-in-nested-objects/288952 "2021-11-11T06:27:56Z")

</div>

Trying to index a SQL database for a eCommerce. It is divided by store where each store has it's own products. I'm trying to create a schema with the following structure. { name: "store1", products: \[{name: "pro…

---

## [7.15 for multi\_terms](https://discuss.elastic.co/t/7-15-for-multi-terms/288606)

<div class="topic-metadata">

**Author:** [@Alexzkh](https://discuss.elastic.co/u/Alexzkh)\
**Replies:** 2\
**Last updated:** [November 11, 2021, 6:04am UTC](https://discuss.elastic.co/t/7-15-for-multi-terms/288606 "2021-11-11T06:04:52Z")

</div>

i used elaticsearch for 7.9.3 ,when I need a method that i can group by multi fields in my aggregations . I find that multi\_terms can combine multi fields and help me complete my aggregation .So I upgrade my dependency w…

---

## [Create and search nested document](https://discuss.elastic.co/t/create-and-search-nested-document/288946)

<div class="topic-metadata">

**Author:** [@Odunayo\_Ogundepo](https://discuss.elastic.co/u/Odunayo_Ogundepo)\
**Replies:** 0\
**Last updated:** [November 11, 2021, 4:51am UTC](https://discuss.elastic.co/t/create-and-search-nested-document/288946 "2021-11-11T04:51:42Z")

</div>

Hi, I have a document that looks like this {"rid" : "1", "oid":"23, "data" :{ "ticks": \[{ "a": "xx", "b" : "yy" }, { "a": "xxx"…

---

## [Need inverted nested mapping](https://discuss.elastic.co/t/need-inverted-nested-mapping/288936)

<div class="topic-metadata">

**Author:** [@elastic\_yogi](https://discuss.elastic.co/u/elastic_yogi)\
**Replies:** 0\
**Last updated:** [November 10, 2021, 11:40pm UTC](https://discuss.elastic.co/t/need-inverted-nested-mapping/288936 "2021-11-10T23:40:40Z")

</div>

How do I get search results that have the nested relationships inverted? Do I need to create another index with the nested relationships inverted? Or can I do this in another way with a different type of query and/or mod…

---

## [ILM for hot & warm nodes](https://discuss.elastic.co/t/ilm-for-hot-warm-nodes/288933)

<div class="topic-metadata">

**Author:** [@linkerc](https://discuss.elastic.co/u/linkerc)\
**Replies:** 1\
**Last updated:** [November 10, 2021, 11:18pm UTC](https://discuss.elastic.co/t/ilm-for-hot-warm-nodes/288933 "2021-11-10T23:18:13Z")

</div>

From what I have read, it's best to setup indices base on time and let time determine which node to move the shards. For example: All shards within 1 month stay in hot and older than 1 month move the cold. Question: …

---

## [Date filtering from crash course part 2](https://discuss.elastic.co/t/date-filtering-from-crash-course-part-2/288934)

<div class="topic-metadata">

**Author:** [@iamtheschmitzer](https://discuss.elastic.co/u/iamtheschmitzer)\
**Replies:** 1\
**Last updated:** [November 10, 2021, 11:03pm UTC](https://discuss.elastic.co/t/date-filtering-from-crash-course-part-2/288934 "2021-11-10T23:03:51Z")

</div>

In part 2 of the crash course Part-2-Understanding-the-relevance-of-your-search-with-Elasticsearch-and-Kibana-/README.md at main · LisaHJung/Part-2-Understanding-the-relevance-of-your-search-with-Elasticsearch-and-Kibana…

---

## [CorruptIndexException: checksum status indeterminate](https://discuss.elastic.co/t/corruptindexexception-checksum-status-indeterminate/288827)

<div class="topic-metadata">

**Author:** [@tropically](https://discuss.elastic.co/u/tropically)\
**Replies:** 14\
**Last updated:** [November 10, 2021, 9:11pm UTC](https://discuss.elastic.co/t/corruptindexexception-checksum-status-indeterminate/288827 "2021-11-10T21:11:47Z")

</div>

Hi We recently had an outage on our openshift clusters. In our Test environment the pods came back up with warnings. The log file shows the following Suppressed: org.apache.lucene.index.CorruptIndexException: checksu…

---

## [How to make optimize snapshot's indices/ directory](https://discuss.elastic.co/t/how-to-make-optimize-snapshots-indices-directory/288776)

<div class="topic-metadata">

**Author:** [@alicango](https://discuss.elastic.co/u/alicango)\
**Replies:** 4\
**Last updated:** [November 10, 2021, 8:41pm UTC](https://discuss.elastic.co/t/how-to-make-optimize-snapshots-indices-directory/288776 "2021-11-10T20:41:14Z")

</div>

Hi, We have a cluster that has a number of 3 Masters, 2 Hot, 2 Warm, and 2 Cold nodes. We have a path setting in the Elasticsearch config file like this; \[root@cold-2 ~\]# grep path /etc/elasticsearch/elasticsearch.yml…

---

## [Possible for users to specify logical operators (OR. AND) in a field applied to a query?](https://discuss.elastic.co/t/possible-for-users-to-specify-logical-operators-or-and-in-a-field-applied-to-a-query/288926)

<div class="topic-metadata">

**Author:** [@JP\_B](https://discuss.elastic.co/u/JP_B)\
**Replies:** 0\
**Last updated:** [November 10, 2021, 8:14pm UTC](https://discuss.elastic.co/t/possible-for-users-to-specify-logical-operators-or-and-in-a-field-applied-to-a-query/288926 "2021-11-10T20:14:25Z")

</div>

I’m building an app to search scientific documents. The abstract from such articles is indexed as a text field. A web front end has input text field to specify keywords which are used in a match query with standard analy…

---

## [How to exclude a specific field in multi get query globally for all docs?](https://discuss.elastic.co/t/how-to-exclude-a-specific-field-in-multi-get-query-globally-for-all-docs/288919)

<div class="topic-metadata">

**Author:** [@Cholley\_Alexandre](https://discuss.elastic.co/u/Cholley_Alexandre)\
**Replies:** 2\
**Last updated:** [November 10, 2021, 8:05pm UTC](https://discuss.elastic.co/t/how-to-exclude-a-specific-field-in-multi-get-query-globally-for-all-docs/288919 "2021-11-10T20:05:03Z")

</div>

Hi, I'm trying to exclude a specific field in a multi-get query, but not by specifying \_source ou \_source\_excludes in each doc but globally for all docs, how is it possible? Thank u in advance for your help :wink:

---

## [Setup one ILM merge task at a time](https://discuss.elastic.co/t/setup-one-ilm-merge-task-at-a-time/288715)

<div class="topic-metadata">

**Author:** [@alfianaf](https://discuss.elastic.co/u/alfianaf)\
**Replies:** 6\
**Last updated:** [November 10, 2021, 8:03pm UTC](https://discuss.elastic.co/t/setup-one-ilm-merge-task-at-a-time/288715 "2021-11-10T20:03:35Z")

</div>

Hello, I've been setting up ILM to merge and compress indices, but when I checked on stats API GET \_stats?pretty the result is two merge tasks run concurrently "merges" : { "current" : 2, "curre…

---

## ['exists' query not working for nested docs with norms=false](https://discuss.elastic.co/t/exists-query-not-working-for-nested-docs-with-norms-false/288256)

<div class="topic-metadata">

**Author:** [@matobaa](https://discuss.elastic.co/u/matobaa)\
**Replies:** 1\
**Last updated:** [November 10, 2021, 7:24pm UTC](https://discuss.elastic.co/t/exists-query-not-working-for-nested-docs-with-norms-false/288256 "2021-11-10T19:24:15Z")

</div>

For fields within nested docs with norms disabled, querying for their existence via 'exists' query appears to not be working. It does however work when norms is enabled. curl -XPUT localhost:9200/test -d '{ { "mapping…

---

## [Will Elasticsearch 7.10 allow me to remain under Apache 2.0 license?](https://discuss.elastic.co/t/will-elasticsearch-7-10-allow-me-to-remain-under-apache-2-0-license/288898)

<div class="topic-metadata">

**Author:** [@truth\_is](https://discuss.elastic.co/u/truth_is)\
**Replies:** 1\
**Last updated:** [November 10, 2021, 7:13pm UTC](https://discuss.elastic.co/t/will-elasticsearch-7-10-allow-me-to-remain-under-apache-2-0-license/288898 "2021-11-10T19:13:47Z")

</div>

My Firm has built client products using \< Elasticsearch 5.0 version. We are planning for an upgrade. If I upgrade Elasticsearch to 7.10 version, will I remain under Apache 2.0 license? Thank you

---

## [Date (Snapshot) - Month name in English for snapshot policy](https://discuss.elastic.co/t/date-snapshot-month-name-in-english-for-snapshot-policy/288885)

<div class="topic-metadata">

**Author:** [@test\_tester](https://discuss.elastic.co/u/test_tester)\
**Replies:** 1\
**Last updated:** [November 10, 2021, 5:40pm UTC](https://discuss.elastic.co/t/date-snapshot-month-name-in-english-for-snapshot-policy/288885 "2021-11-10T17:40:52Z")

</div>

Hi, I want Elasticsearch snapshots named with date in english and date in numerals when they are created. With the following template snapshot\_MMYYYY\_foo Something like this: snapshot\_nov2021\_foo How this can be done…

---

## [Elasticsearch Query discard documents where sum of field is x](https://discuss.elastic.co/t/elasticsearch-query-discard-documents-where-sum-of-field-is-x/288916)

<div class="topic-metadata">

**Author:** [@jjammin92](https://discuss.elastic.co/u/jjammin92)\
**Replies:** 0\
**Last updated:** [November 10, 2021, 5:23pm UTC](https://discuss.elastic.co/t/elasticsearch-query-discard-documents-where-sum-of-field-is-x/288916 "2021-11-10T17:23:56Z")

</div>

Hello, I have documents that look like the following: "\_index": "test", "\_type": "\_doc", "\_id": "p767Cn0BpA6tOYGm9B\_P", "\_version": 1, "\_score": null, "\_source": { "path": "entry\_1", "elap\_t": 89, …

---

## [ECK on GKE Ingress Health Checks not working](https://discuss.elastic.co/t/eck-on-gke-ingress-health-checks-not-working/288912)

<div class="topic-metadata">

**Author:** [@trudesea](https://discuss.elastic.co/u/trudesea)\
**Replies:** 0\
**Last updated:** [November 10, 2021, 4:03pm UTC](https://discuss.elastic.co/t/eck-on-gke-ingress-health-checks-not-working/288912 "2021-11-10T16:03:53Z")

</div>

Hi, So this is my first attempt in getting this working. I was able to get an ingress into Kibana just fine, but using the es-http service as the backend is showing unhealthy. I assume this is because of the path bein…

---

## [Suggest query does not work when used with script query?](https://discuss.elastic.co/t/suggest-query-does-not-work-when-used-with-script-query/288888)

<div class="topic-metadata">

**Author:** [@Ejaz\_Ahmed](https://discuss.elastic.co/u/Ejaz_Ahmed)\
**Replies:** 0\
**Last updated:** [November 10, 2021, 1:02pm UTC](https://discuss.elastic.co/t/suggest-query-does-not-work-when-used-with-script-query/288888 "2021-11-10T13:02:50Z")

</div>

Suggest query does not return anything when used with script \_score query {"\_source": {"excludes": \["tag", "document\_vector"\]}, "size": 1000, "query": { "script\_score": { "q…

---

## [High cardinality aggregation questions](https://discuss.elastic.co/t/high-cardinality-aggregation-questions/287169)

<div class="topic-metadata">

**Author:** [@galambo](https://discuss.elastic.co/u/galambo)\
**Replies:** 5\
**Last updated:** [November 10, 2021, 12:15pm UTC](https://discuss.elastic.co/t/high-cardinality-aggregation-questions/287169 "2021-11-10T12:15:55Z")

</div>

Hello, I'm currently working on a use case with an extremely high cardinality (couple of million combinations) and I'm having trouble understanding how ES behaves with aggregations. Here are sample documents: { …

---

## [ElasticSearch when I index there is like a limit in which It stops indexing and increments the number of docs.deleted](https://discuss.elastic.co/t/elasticsearch-when-i-index-there-is-like-a-limit-in-which-it-stops-indexing-and-increments-the-number-of-docs-deleted/288797)

<div class="topic-metadata">

**Author:** [@Juliito19](https://discuss.elastic.co/u/Juliito19)\
**Replies:** 5\
**Last updated:** [November 10, 2021, 12:06pm UTC](https://discuss.elastic.co/t/elasticsearch-when-i-index-there-is-like-a-limit-in-which-it-stops-indexing-and-increments-the-number-of-docs-deleted/288797 "2021-11-10T12:06:27Z")

</div>

Hi, I have an Apliccation in which I have an Elasticsearch template and I Insert with the pattern of template+(yyyy-MM-dd), Well, So far, so good, I think, but for each Index I suppose that have like a Limit in which w…

---

## [Could not read repository data from index blob](https://discuss.elastic.co/t/could-not-read-repository-data-from-index-blob/288880)

<div class="topic-metadata">

**Author:** [@vaclav1](https://discuss.elastic.co/u/vaclav1)\
**Replies:** 0\
**Last updated:** [November 10, 2021, 11:14am UTC](https://discuss.elastic.co/t/could-not-read-repository-data-from-index-blob/288880 "2021-11-10T11:14:20Z")

</div>

When trying to read all snaphots from the repository in s3 we are getting the error: \[user@adapt103:~\]$ curl 'http://localhost:9200/\_cat/snapshots/adapt-prod\_202111?pretty' { "error" : { "root\_cause" : \[ { …

---

## [Index PDF with Ingest Attachement Plugin using NodeJS Client](https://discuss.elastic.co/t/index-pdf-with-ingest-attachement-plugin-using-nodejs-client/288870)

<div class="topic-metadata">

**Author:** [@BE-CH](https://discuss.elastic.co/u/BE-CH)\
**Replies:** 3\
**Last updated:** [November 10, 2021, 11:04am UTC](https://discuss.elastic.co/t/index-pdf-with-ingest-attachement-plugin-using-nodejs-client/288870 "2021-11-10T11:04:34Z")

</div>

I am having a hard time understanding how I can index files such PDF and .RTF files using the Ingest Attachment Processor Plugin and make them searchable. My main problem seems to be that I can't search for the files af…

---

## [Results not displayed in kibana](https://discuss.elastic.co/t/results-not-displayed-in-kibana/288874)

<div class="topic-metadata">

**Author:** [@mostafaelsayed](https://discuss.elastic.co/u/mostafaelsayed)\
**Replies:** 0\
**Last updated:** [November 10, 2021, 10:34am UTC](https://discuss.elastic.co/t/results-not-displayed-in-kibana/288874 "2021-11-10T10:34:50Z")

</div>

Hello I have an Elasticsearch index that has one primary shard and one replica shard. This is a snapshot of the document count: document count on the primary shard is 677919 document count on the replica shard is 638…

---

## [SSL\_ERROR\_SYSCALL in connection to es01:9200](https://discuss.elastic.co/t/ssl-error-syscall-in-connection-to-es01-9200/288323)

<div class="topic-metadata">

**Author:** [@cocolab](https://discuss.elastic.co/u/cocolab)\
**Replies:** 2\
**Last updated:** [November 10, 2021, 10:32am UTC](https://discuss.elastic.co/t/ssl-error-syscall-in-connection-to-es01-9200/288323 "2021-11-10T10:32:31Z")

</div>

Hello, I am aware that other people have asked this before but it seems that none of those answers fit my case. I need to enable encryption on the communication between the nodes with TLS. (Currently one ES node + one …

---

## [Problem getting text search hits](https://discuss.elastic.co/t/problem-getting-text-search-hits/288601)

<div class="topic-metadata">

**Author:** [@TS1997](https://discuss.elastic.co/u/TS1997)\
**Replies:** 1\
**Last updated:** [November 10, 2021, 9:47am UTC](https://discuss.elastic.co/t/problem-getting-text-search-hits/288601 "2021-11-10T09:47:29Z")

</div>

Hello, I'm currently trying to implement my first search using Elasticsearch in Pimcore but am having issues getting hits on text strings. I'm currently using the Kibana dev tools to perform my search so Pimcore is only…

---

## [Unfortunately I have deleted some index files](https://discuss.elastic.co/t/unfortunately-i-have-deleted-some-index-files/287878)

<div class="topic-metadata">

**Author:** [@Ravinder28](https://discuss.elastic.co/u/Ravinder28)\
**Replies:** 17\
**Last updated:** [November 10, 2021, 9:24am UTC](https://discuss.elastic.co/t/unfortunately-i-have-deleted-some-index-files/287878 "2021-11-10T09:24:18Z")

</div>

unfortunately i have deleted some index files in below path. home/Elasticsearch/data/nodes/0/indices/ Elasticsearch is stopped and we are trying to restart the Elasticsearch but am getting below error. "\[2021-10-25T11…

---

## [Limit of total fields has been exceeded -\> set for dynamic daily index](https://discuss.elastic.co/t/limit-of-total-fields-has-been-exceeded-set-for-dynamic-daily-index/288851)

<div class="topic-metadata">

**Author:** [@INS](https://discuss.elastic.co/u/INS)\
**Replies:** 0\
**Last updated:** [November 10, 2021, 7:46am UTC](https://discuss.elastic.co/t/limit-of-total-fields-has-been-exceeded-set-for-dynamic-daily-index/288851 "2021-11-10T07:46:49Z")

</div>

Hi How can I set permanently for my all index index.mapping.total\_fields.limit I've daily indexes index =\> "logstash-test2000-%{+YYYY.MM.dd}" below input was set for only one index PUT logstash-\*/\_settings { "index…

---

## [Elasticsearch not working after spring-boot upgrade to 2.2.0.RELEASE](https://discuss.elastic.co/t/elasticsearch-not-working-after-spring-boot-upgrade-to-2-2-0-release/288849)

<div class="topic-metadata">

**Author:** [@simarjsi](https://discuss.elastic.co/u/simarjsi)\
**Replies:** 0\
**Last updated:** [November 10, 2021, 7:43am UTC](https://discuss.elastic.co/t/elasticsearch-not-working-after-spring-boot-upgrade-to-2-2-0-release/288849 "2021-11-10T07:43:09Z")

</div>

I am upgrading one of our applications from spring-boot version 2.1.3.RELEASE to 2.2.0.RELEASE but I am facing some issues with Elasticsearch. Here is the error I am getting java.lang.IllegalStateException: Failed to lo…

---

## [Intermittently failed with 401 Unauthorized](https://discuss.elastic.co/t/intermittently-failed-with-401-unauthorized/288835)

<div class="topic-metadata">

**Author:** [@John\_Luong\_Nhat\_Truo](https://discuss.elastic.co/u/John_Luong_Nhat_Truo)\
**Replies:** 5\
**Last updated:** [November 10, 2021, 7:24am UTC](https://discuss.elastic.co/t/intermittently-failed-with-401-unauthorized/288835 "2021-11-10T07:24:22Z")

</div>

Hi, I'm using basic authentication with REST API but sometime server response 401 Unauthorized as: 401 Unauthorized {"error":{"root\_cause":\[{"type":"security\_exception","reason":"unable to authenticate user \[xxxxxxxxx\]…

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

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