# Elasticsearch

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

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

**Page:** 454

---

## [How to get a service token with api/curl](https://discuss.elastic.co/t/how-to-get-a-service-token-with-api-curl/302929)

<div class="topic-metadata">

**Author:** [@gabrielfsousa](https://discuss.elastic.co/u/gabrielfsousa)\
**Replies:** 0\
**Last updated:** [April 21, 2022, 3:00pm UTC](https://discuss.elastic.co/t/how-to-get-a-service-token-with-api-curl/302929 "2022-04-21T15:00:43Z")

</div>

how to get a service token with api/curl ? i know how to create.

---

## [ELK Painless: count unique distinct occurrences](https://discuss.elastic.co/t/elk-painless-count-unique-distinct-occurrences/302582)

<div class="topic-metadata">

**Author:** [@angeloimm](https://discuss.elastic.co/u/angeloimm)\
**Replies:** 1\
**Last updated:** [April 21, 2022, 2:00pm UTC](https://discuss.elastic.co/t/elk-painless-count-unique-distinct-occurrences/302582 "2022-04-21T14:00:27Z")

</div>

Hi there I'm using ELK stack version 7. What I need to do is to count the unique occorence of a value in my indexes. My indexes are created by WSO2 Identity Server version 5.10 and they are so defined: { "lo…

---

## [Upgrade to 8.1.2 failing with unexpected folder encountered during data folder upgrade](https://discuss.elastic.co/t/upgrade-to-8-1-2-failing-with-unexpected-folder-encountered-during-data-folder-upgrade/302767)

<div class="topic-metadata">

**Author:** [@parthmaniar](https://discuss.elastic.co/u/parthmaniar)\
**Replies:** 9\
**Last updated:** [April 21, 2022, 12:36pm UTC](https://discuss.elastic.co/t/upgrade-to-8-1-2-failing-with-unexpected-folder-encountered-during-data-folder-upgrade/302767 "2022-04-21T12:36:10Z")

</div>

Hello, I upgraded 1 of the 2 data nodes in my 3 node cluster (3rd node is voting only and does not store any data) from 7.17.2 to 8.1.2. Post the upgrade, Elasticsearch service is crashing with the following error: Exc…

---

## [Cannot run bin/elasticsearch](https://discuss.elastic.co/t/cannot-run-bin-elasticsearch/302821)

<div class="topic-metadata">

**Author:** [@FARIDUN\_ISMAILOV](https://discuss.elastic.co/u/FARIDUN_ISMAILOV)\
**Replies:** 2\
**Last updated:** [April 21, 2022, 9:32am UTC](https://discuss.elastic.co/t/cannot-run-bin-elasticsearch/302821 "2022-04-21T09:32:47Z")

</div>

bin/elasticsearch Exception in thread "main" java.lang.NullPointerException: Cannot invoke "org.apache.logging.log4j.core.config.AbstractConfiguration.getLoggerContext()" because the return value of "java.util.List.get(…

---

## [Best practice in using elasticClient with authentication in .net core](https://discuss.elastic.co/t/best-practice-in-using-elasticclient-with-authentication-in-net-core/302888)

<div class="topic-metadata">

**Author:** [@Or\_Komlosh](https://discuss.elastic.co/u/Or_Komlosh)\
**Replies:** 0\
**Last updated:** [April 21, 2022, 9:28am UTC](https://discuss.elastic.co/t/best-practice-in-using-elasticclient-with-authentication-in-net-core/302888 "2022-04-21T09:28:00Z")

</div>

Hey, we are trying to create a POC for using Elasticsearch in one of our features. I couldn't find a proper example of how to use Elasticsearch in .netcore DI. what is the best life time for elasticClient? I manage to…

---

## [Is that a problem using Elasticsearch-dsl-py 7.4 with Elasticsearch version8?](https://discuss.elastic.co/t/is-that-a-problem-using-elasticsearch-dsl-py-7-4-with-elasticsearch-version8/302479)

<div class="topic-metadata">

**Author:** [@m-amano](https://discuss.elastic.co/u/m-amano)\
**Replies:** 2\
**Last updated:** [April 21, 2022, 8:04am UTC](https://discuss.elastic.co/t/is-that-a-problem-using-elasticsearch-dsl-py-7-4-with-elasticsearch-version8/302479 "2022-04-21T08:04:38Z")

</div>

I am using Elasticsearch and Kibana version 7.17.0 and panning to upgrade version 8.y.z. My application use Elasticsearch and Elasticsearch DSL pyhton client with major version 7. I know that the latest version of dsl-…

---

## [Fix log4j ：upgrade ES version OR replace log4j.jar to 2.17.2](https://discuss.elastic.co/t/fix-log4j-upgrade-es-version-or-replace-log4j-jar-to-2-17-2/302786)

<div class="topic-metadata">

**Author:** [@qiuxb](https://discuss.elastic.co/u/qiuxb)\
**Replies:** 5\
**Last updated:** [April 21, 2022, 7:48am UTC](https://discuss.elastic.co/t/fix-log4j-upgrade-es-version-or-replace-log4j-jar-to-2-17-2/302786 "2022-04-21T07:48:05Z")

</div>

At present, we have more than 500 Elasticsearch clusters, with thousands of nodes. The Elasticsearch versions are 6.3.2, 7.2 and 7.4. In order to solve the log4j vulnerability, if you choose to upgrade the Elasticsearch …

---

## [How to Stack Cardinality Transforms](https://discuss.elastic.co/t/how-to-stack-cardinality-transforms/302851)

<div class="topic-metadata">

**Author:** [@Ashfur](https://discuss.elastic.co/u/Ashfur)\
**Replies:** 1\
**Last updated:** [April 21, 2022, 6:07am UTC](https://discuss.elastic.co/t/how-to-stack-cardinality-transforms/302851 "2022-04-21T06:07:52Z")

</div>

Hello, This is a followup question for: In order to delete old raw data without impacting the continuous lifetime cardinality aggregation transform, I was suggested to stack 2 transforms together. The first transfo…

---

## [Could not index event to Elasticsearch DataStream](https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-datastream/302722)

<div class="topic-metadata">

**Author:** [@wcpoon](https://discuss.elastic.co/u/wcpoon)\
**Replies:** 5\
**Last updated:** [April 21, 2022, 5:55am UTC](https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-datastream/302722 "2022-04-21T05:55:06Z")

</div>

Hi, I'm having warning to ingest data to Data Stream from winlogbeat \> logstash then output to Elasticsearch. Below is the warning message, any one can assist me? what should I do to resolve it? Apr 19 21:34:10 z3lynx…

---

## [Restore backup taken from other elasticsearch to new one](https://discuss.elastic.co/t/restore-backup-taken-from-other-elasticsearch-to-new-one/302867)

<div class="topic-metadata">

**Author:** [@Blason](https://discuss.elastic.co/u/Blason)\
**Replies:** 1\
**Last updated:** [April 21, 2022, 4:39am UTC](https://discuss.elastic.co/t/restore-backup-taken-from-other-elasticsearch-to-new-one/302867 "2022-04-21T04:39:36Z")

</div>

Hi Team, I have a elastic stack where the indices backup is taken on s3 bucket and it around 5 TB of data. I am planning to copy it to another S3 bucket and will be installing fresh elastic stack. Wondering if I can re…

---

## [Any search\_after performance updated?](https://discuss.elastic.co/t/any-search-after-performance-updated/302809)

<div class="topic-metadata">

**Author:** [@ht.jo](https://discuss.elastic.co/u/ht.jo)\
**Replies:** 2\
**Last updated:** [April 21, 2022, 3:21am UTC](https://discuss.elastic.co/t/any-search-after-performance-updated/302809 "2022-04-21T03:21:36Z")

</div>

Hi. I'm using 7.10 and I'm going through exact same situation below link. As the @mayya 's answer (Thx mayya!), I expected search\_after performance has improved at 7.16, so I looked over 7.16 release note, but I can't…

---

## [Using curl to cat indices](https://discuss.elastic.co/t/using-curl-to-cat-indices/302855)

<div class="topic-metadata">

**Author:** [@eh2021-elastic](https://discuss.elastic.co/u/eh2021-elastic)\
**Replies:** 2\
**Last updated:** [April 21, 2022, 1:09am UTC](https://discuss.elastic.co/t/using-curl-to-cat-indices/302855 "2022-04-21T01:09:38Z")

</div>

I am trying to use curl to pull back a specific set of indexs based on the date. The curl command I try running is below. curl -X GET -u user -k "http://masterIP:9200/\_cat/indices/\*2202-03-30?bytes=mb&v=true&s=index" …

---

## [Warm vs. Cold (+ Frozen) for archival](https://discuss.elastic.co/t/warm-vs-cold-frozen-for-archival/302814)

<div class="topic-metadata">

**Author:** [@schapman](https://discuss.elastic.co/u/schapman)\
**Replies:** 8\
**Last updated:** [April 20, 2022, 11:17pm UTC](https://discuss.elastic.co/t/warm-vs-cold-frozen-for-archival/302814 "2022-04-20T23:17:46Z")

</div>

First, this is in the context of using Elastic Cloud. Our use case is primarily archiving logs and metrics mostly for compliance and security forensics. We'll be using some of the metrics in the short term (daily basis, …

---

## [Enrich Policy Execute Unable to Find Source Index](https://discuss.elastic.co/t/enrich-policy-execute-unable-to-find-source-index/302750)

<div class="topic-metadata">

**Author:** [@cj\_hillbrand](https://discuss.elastic.co/u/cj_hillbrand)\
**Replies:** 14\
**Last updated:** [April 20, 2022, 6:08pm UTC](https://discuss.elastic.co/t/enrich-policy-execute-unable-to-find-source-index/302750 "2022-04-20T18:08:57Z")

</div>

Hello, I am trying to familiarize myself with the Enrich Policy. I have set up a source index and an enrich policy. When I go to execute the enrich policy I receive a "index\_not\_found\_exception". I have posted some sho…

---

## [Interesting cardinality aggregation query](https://discuss.elastic.co/t/interesting-cardinality-aggregation-query/302845)

<div class="topic-metadata">

**Author:** [@acc23](https://discuss.elastic.co/u/acc23)\
**Replies:** 0\
**Last updated:** [April 20, 2022, 5:13pm UTC](https://discuss.elastic.co/t/interesting-cardinality-aggregation-query/302845 "2022-04-20T17:13:31Z")

</div>

I am new to writing ES queries. I have an index that contains log data for thousands of nodes and I need to query the following: Aggregate request source IP addresses that are matched in at least X number of nodes ("age…

---

## [DISTINCT values DSL query](https://discuss.elastic.co/t/distinct-values-dsl-query/302715)

<div class="topic-metadata">

**Author:** [@adrianfusco](https://discuss.elastic.co/u/adrianfusco)\
**Replies:** 2\
**Last updated:** [April 20, 2022, 3:05pm UTC](https://discuss.elastic.co/t/distinct-values-dsl-query/302715 "2022-04-20T15:05:32Z")

</div>

Hello, I've been reading a lot about this topic because I've seen it has been asked before but I can do it works yet. I am trying to get unique values from an index. I have something like this: id | app\_name | …

---

## [Using HAProxy in front of ES cluster?](https://discuss.elastic.co/t/using-haproxy-in-front-of-es-cluster/302739)

<div class="topic-metadata">

**Author:** [@tflorac](https://discuss.elastic.co/u/tflorac)\
**Replies:** 1\
**Last updated:** [April 20, 2022, 2:58pm UTC](https://discuss.elastic.co/t/using-haproxy-in-front-of-es-cluster/302739 "2022-04-20T14:58:29Z")

</div>

Hi, When using an Elasticsearch cluster, I understand that I can set the addresses of all the cluster nodes on my client application side. But: what occurs if I define only one node address on application side? is th…

---

## [Slow handling of documents when large text in a field](https://discuss.elastic.co/t/slow-handling-of-documents-when-large-text-in-a-field/302679)

<div class="topic-metadata">

**Author:** [@lubosvr](https://discuss.elastic.co/u/lubosvr)\
**Replies:** 10\
**Last updated:** [April 20, 2022, 2:45pm UTC](https://discuss.elastic.co/t/slow-handling-of-documents-when-large-text-in-a-field/302679 "2022-04-20T14:45:03Z")

</div>

Hi, We have problems when handling for documents with large content in a single field. We have index with mapping like this: "mappings" : { "properties" : { "properties" : { "name" : { "type" : "te…

---

## [Search\_as\_you\_type highlight issue](https://discuss.elastic.co/t/search-as-you-type-highlight-issue/302825)

<div class="topic-metadata">

**Author:** [@sinnetll19](https://discuss.elastic.co/u/sinnetll19)\
**Replies:** 0\
**Last updated:** [April 20, 2022, 2:18pm UTC](https://discuss.elastic.co/t/search-as-you-type-highlight-issue/302825 "2022-04-20T14:18:22Z")

</div>

Continuing the discussion from Search\_as\_you\_type and highlight: "It will only highlight matching tokens — if you leave out the space after fox, it won't mark that." why does this happen and how can i use a search\_as\_y…

---

## [Does clustering important for elastic stack](https://discuss.elastic.co/t/does-clustering-important-for-elastic-stack/302784)

<div class="topic-metadata">

**Author:** [@hadii](https://discuss.elastic.co/u/hadii)\
**Replies:** 4\
**Last updated:** [April 20, 2022, 12:39pm UTC](https://discuss.elastic.co/t/does-clustering-important-for-elastic-stack/302784 "2022-04-20T12:39:14Z")

</div>

Could anyone explain to me clearly does clustering is required or not for elastic stack?

---

## [AcceptSecurityContext error, data 532](https://discuss.elastic.co/t/acceptsecuritycontext-error-data-532/302602)

<div class="topic-metadata">

**Author:** [@yt\_h](https://discuss.elastic.co/u/yt_h)\
**Replies:** 2\
**Last updated:** [April 20, 2022, 12:22pm UTC](https://discuss.elastic.co/t/acceptsecuritycontext-error-data-532/302602 "2022-04-20T12:22:28Z")

</div>

Crazy print domain authentication failed in my Elasticsearch logs today {"type": "server", "timestamp": "2022-04-18T08:55:38,254Z", "level": "WARN", "component": "o.e.x.s.a.AuthenticationService", "cluster.name": "Elast…

---

## [How to access objects fields nested value in runtime field painless (or expression) scripts?](https://discuss.elastic.co/t/how-to-access-objects-fields-nested-value-in-runtime-field-painless-or-expression-scripts/302699)

<div class="topic-metadata">

**Author:** [@Mohammad\_Ostadi](https://discuss.elastic.co/u/Mohammad_Ostadi)\
**Replies:** 1\
**Last updated:** [April 20, 2022, 9:25am UTC](https://discuss.elastic.co/t/how-to-access-objects-fields-nested-value-in-runtime-field-painless-or-expression-scripts/302699 "2022-04-20T09:25:33Z")

</div>

I have a document like this: POST test/\_doc { "name":"Ali", "age":20, "grades":\[ { "title":"math", "score":1 }, { "title":"english", "score":2 }, { "title":"physic", "sc…

---

## [Custom search fields using metadata](https://discuss.elastic.co/t/custom-search-fields-using-metadata/302713)

<div class="topic-metadata">

**Author:** [@Hamza\_Youssouf](https://discuss.elastic.co/u/Hamza_Youssouf)\
**Replies:** 1\
**Last updated:** [April 20, 2022, 8:26am UTC](https://discuss.elastic.co/t/custom-search-fields-using-metadata/302713 "2022-04-20T08:26:36Z")

</div>

Hello, I'm new to Elastic. I would like to develop a .Net application that will use Elastic. I had a question about the research part. I have several types of documents with each specific metadata. Would it be possible …

---

## [Missing \_meta field in mapping \[doc\] of index\[watches\] & \[.triggered\_watches\]](https://discuss.elastic.co/t/missing-meta-field-in-mapping-doc-of-index-watches-triggered-watches/302410)

<div class="topic-metadata">

**Author:** [@axi](https://discuss.elastic.co/u/axi)\
**Replies:** 1\
**Last updated:** [April 20, 2022, 8:23am UTC](https://discuss.elastic.co/t/missing-meta-field-in-mapping-doc-of-index-watches-triggered-watches/302410 "2022-04-20T08:23:21Z")

</div>

I just updated my cloud elastic stack from 6.8.23 to 7.17.2 using the cloud.elastic.co dashboard and all went well but I have now some WARNs in the log section of the dashboard: \[instance-0000000010\] Missing \_meta field…

---

## [How to set analyzer in Java Client Elasticsearch -\> Search Request Builder in query time](https://discuss.elastic.co/t/how-to-set-analyzer-in-java-client-elasticsearch-search-request-builder-in-query-time/302723)

<div class="topic-metadata">

**Author:** [@joanjanku2000](https://discuss.elastic.co/u/joanjanku2000)\
**Replies:** 1\
**Last updated:** [April 20, 2022, 8:22am UTC](https://discuss.elastic.co/t/how-to-set-analyzer-in-java-client-elasticsearch-search-request-builder-in-query-time/302723 "2022-04-20T08:22:56Z")

</div>

How to set analyzer in Java Client Elasticsearch -\> Search Request Builder in query time

---

## [How to create Elasticsearch Dedicated Replica Cluster](https://discuss.elastic.co/t/how-to-create-elasticsearch-dedicated-replica-cluster/301697)

<div class="topic-metadata">

**Author:** [@tusharnemade](https://discuss.elastic.co/u/tusharnemade)\
**Replies:** 11\
**Last updated:** [April 20, 2022, 6:29am UTC](https://discuss.elastic.co/t/how-to-create-elasticsearch-dedicated-replica-cluster/301697 "2022-04-20T06:29:38Z")

</div>

Hello Everyone: I am using Elasticsearch v7.8.0 cluster having indices in 100TB+. I am looking for a backup cluster for my running PROD cluster , a cluster where my DATA would reside in READ-ONLY Manner while it still …

---

## [How to pull large amount of data (all documents in the index) using elasticsearch python client?](https://discuss.elastic.co/t/how-to-pull-large-amount-of-data-all-documents-in-the-index-using-elasticsearch-python-client/302763)

<div class="topic-metadata">

**Author:** [@safarial.fatemeh](https://discuss.elastic.co/u/safarial.fatemeh)\
**Replies:** 3\
**Last updated:** [April 20, 2022, 6:22am UTC](https://discuss.elastic.co/t/how-to-pull-large-amount-of-data-all-documents-in-the-index-using-elasticsearch-python-client/302763 "2022-04-20T06:22:34Z")

</div>

I'm using Elasticsearch.helpers.scan to pull down over 1M documents from Elasticsearch and I use match\_all query for that. the process is superslow (taking over 2hrs). is there a better way to pull down all the documen…

---

## [Dense vector field type](https://discuss.elastic.co/t/dense-vector-field-type/302548)

<div class="topic-metadata">

**Author:** [@Anand\_p\_s](https://discuss.elastic.co/u/Anand_p_s)\
**Replies:** 4\
**Last updated:** [April 20, 2022, 6:06am UTC](https://discuss.elastic.co/t/dense-vector-field-type/302548 "2022-04-20T06:06:51Z")

</div>

How can apply dense vector size(dims) to 2048 "mappings": { "properties": { "denseVector": { "type": "dense\_vector", "index": false, "dims":2048 } } } And i got The number of dimensions for field \[denseVector\]…

---

## [Content match in elasticsearch query over date range](https://discuss.elastic.co/t/content-match-in-elasticsearch-query-over-date-range/302478)

<div class="topic-metadata">

**Author:** [@stecino](https://discuss.elastic.co/u/stecino)\
**Replies:** 5\
**Last updated:** [April 20, 2022, 5:14am UTC](https://discuss.elastic.co/t/content-match-in-elasticsearch-query-over-date-range/302478 "2022-04-20T05:14:24Z")

</div>

Hello, Trying to execute query over an index for the last 5 minutes, where message field contain word IIOP\_CLEAR\_TEXT. Would like to get all the results, via pagination as well using 10000 records per page. How can th…

---

## [Invalid configuration for xpack.security.transport.ssl - \[xpack.security.transport.ssl.enabled\]](https://discuss.elastic.co/t/invalid-configuration-for-xpack-security-transport-ssl-xpack-security-transport-ssl-enabled/302761)

<div class="topic-metadata">

**Author:** [@Fikri\_Naufal\_F](https://discuss.elastic.co/u/Fikri_Naufal_F)\
**Replies:** 2\
**Last updated:** [April 20, 2022, 3:20am UTC](https://discuss.elastic.co/t/invalid-configuration-for-xpack-security-transport-ssl-xpack-security-transport-ssl-enabled/302761 "2022-04-20T03:20:24Z")

</div>

i already uninstall my existing Elasticsearch 7.16 and then install Elasticsearch 8.1.2 but i got this error when run elasticseacrh. what i supose to do? Exception org.elasticsearch.ElasticsearchSecurityException: inval…

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

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