# Elasticsearch

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

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

**Page:** 432

---

## [What role should I attach to anonymous user?](https://discuss.elastic.co/t/what-role-should-i-attach-to-anonymous-user/304919)

<div class="topic-metadata">

**Author:** [@rachit\_upadhyay](https://discuss.elastic.co/u/rachit_upadhyay)\
**Replies:** 3\
**Last updated:** [June 2, 2022, 12:48pm UTC](https://discuss.elastic.co/t/what-role-should-i-attach-to-anonymous-user/304919 "2022-06-02T12:48:23Z")

</div>

So, I am using the Elasticsearch and have the xpack.security.enabled as true. When I try to open the IP:Port and check the status of Elasticsearch node, I have to authorize myself. I wanted to know is it possible to have…

---

## [Editing an enrich policy](https://discuss.elastic.co/t/editing-an-enrich-policy/305494)

<div class="topic-metadata">

**Author:** [@chapmantrain](https://discuss.elastic.co/u/chapmantrain)\
**Replies:** 3\
**Last updated:** [June 2, 2022, 12:17pm UTC](https://discuss.elastic.co/t/editing-an-enrich-policy/305494 "2022-06-02T12:17:04Z")

</div>

It appears that if I need to edit an enrichment policy that an ingest pipeline uses, I have to delete the pipe, then delete the policy, then create the new edited policy, then create the ingest pipeline. That is the proc…

---

## [How to add privileges to elastic/fleet-server](https://discuss.elastic.co/t/how-to-add-privileges-to-elastic-fleet-server/306153)

<div class="topic-metadata">

**Author:** [@rupam1](https://discuss.elastic.co/u/rupam1)\
**Replies:** 4\
**Last updated:** [June 2, 2022, 11:08am UTC](https://discuss.elastic.co/t/how-to-add-privileges-to-elastic-fleet-server/306153 "2022-06-02T11:08:44Z")

</div>

I have generated token with elastic fleet-server, while creating new index with that token I am getting security exception saying unauthorised user elastic/fleet-server

---

## [Indices are not deleteing using Lifecycle policy](https://discuss.elastic.co/t/indices-are-not-deleteing-using-lifecycle-policy/306105)

<div class="topic-metadata">

**Author:** [@santosh\_rout](https://discuss.elastic.co/u/santosh_rout)\
**Replies:** 3\
**Last updated:** [June 2, 2022, 9:59am UTC](https://discuss.elastic.co/t/indices-are-not-deleteing-using-lifecycle-policy/306105 "2022-06-02T09:59:52Z")

</div>

In elastic 7.12, I have tried through kibana gui but indices are not able to linked so I used these commands in cli but Indices are linked in kibana but not deleting so please help me on this? #curl -u elastic: -XPUT -s…

---

## [How to find Class implementing Function\< CreateIndexRequest.Builder, ObjectBuilder\< CreateIndexRequest\>\>?](https://discuss.elastic.co/t/how-to-find-class-implementing-function-createindexrequest-builder-objectbuilder-createindexrequest/306114)

<div class="topic-metadata">

**Author:** [@Enomine](https://discuss.elastic.co/u/Enomine)\
**Replies:** 2\
**Last updated:** [June 2, 2022, 8:53am UTC](https://discuss.elastic.co/t/how-to-find-class-implementing-function-createindexrequest-builder-objectbuilder-createindexrequest/306114 "2022-06-02T08:53:05Z")

</div>

Hi, may one create a new index to the client by client.indices().create(c -\> c.index("products2")); May one other be interested in doing so without using lambda-expression. He will need to give a CreateIndexRequest Ob…

---

## [Elasticseach JDK and sql-cli vulnerability mitigation](https://discuss.elastic.co/t/elasticseach-jdk-and-sql-cli-vulnerability-mitigation/306124)

<div class="topic-metadata">

**Author:** [@truptir](https://discuss.elastic.co/u/truptir)\
**Replies:** 2\
**Last updated:** [June 2, 2022, 8:16am UTC](https://discuss.elastic.co/t/elasticseach-jdk-and-sql-cli-vulnerability-mitigation/306124 "2022-06-02T08:16:23Z")

</div>

Hi, I'm using Elastic Version - 7.6.0, as per the vulnerability scan below 2 are impacted. Elasticsearch-sql-cli-7.6.0.jar Elasticsearch-7.6.0/jdk - 1.13.0.2.8 Is there a way to just upgrade only these 2 libs as a qu…

---

## [Can't get highlighted results using Java High Level Rest Client](https://discuss.elastic.co/t/cant-get-highlighted-results-using-java-high-level-rest-client/305261)

<div class="topic-metadata">

**Author:** [@Tasdiq\_Shaikh](https://discuss.elastic.co/u/Tasdiq_Shaikh)\
**Replies:** 17\
**Last updated:** [June 2, 2022, 6:53am UTC](https://discuss.elastic.co/t/cant-get-highlighted-results-using-java-high-level-rest-client/305261 "2022-06-02T06:53:37Z")

</div>

I am using Java 1.8 and Elasticsearch 7.12.0. Hello, I am trying to get Highlighter to work but all i'm getting is the whole document in which word is available and I should get only the snippets of the highlighted word…

---

## [ElasticSearch Java RESTAPI dout?](https://discuss.elastic.co/t/elasticsearch-java-restapi-dout/306117)

<div class="topic-metadata">

**Author:** [@Maheee000](https://discuss.elastic.co/u/Maheee000)\
**Replies:** 3\
**Last updated:** [June 2, 2022, 6:45am UTC](https://discuss.elastic.co/t/elasticsearch-java-restapi-dout/306117 "2022-06-02T06:45:30Z")

</div>

Hi Team, PFA and how to I do in java with dynamic field value and dynamic boolqueries. In this part dynamic values comes from CSV file. BoolQueries : must, should, mustnot --- it will change user purpose Queries:--…

---

## [Is there a straight forward method of cloning an index on one cluster from another cluster](https://discuss.elastic.co/t/is-there-a-straight-forward-method-of-cloning-an-index-on-one-cluster-from-another-cluster/306180)

<div class="topic-metadata">

**Author:** [@Russell\_Fulton](https://discuss.elastic.co/u/Russell_Fulton)\
**Replies:** 1\
**Last updated:** [June 2, 2022, 6:45am UTC](https://discuss.elastic.co/t/is-there-a-straight-forward-method-of-cloning-an-index-on-one-cluster-from-another-cluster/306180 "2022-06-02T06:45:00Z")

</div>

I am setting up a test cluster and want to copy all the index definitions from the production one.

---

## [Elasticsearch Can I create a calculated dashboard (GB) per day?](https://discuss.elastic.co/t/elasticsearch-can-i-create-a-calculated-dashboard-gb-per-day/306179)

<div class="topic-metadata">

**Author:** [@Tassanai\_Chopseang](https://discuss.elastic.co/u/Tassanai_Chopseang)\
**Replies:** 3\
**Last updated:** [June 2, 2022, 6:44am UTC](https://discuss.elastic.co/t/elasticsearch-can-i-create-a-calculated-dashboard-gb-per-day/306179 "2022-06-02T06:44:45Z")

</div>

I want to make a dashboard to monitor instead of running a backyard query. :face\_holding\_back\_tears:

---

## [Date math in index name error in 8.1.3](https://discuss.elastic.co/t/date-math-in-index-name-error-in-8-1-3/305186)

<div class="topic-metadata">

**Author:** [@rugenl](https://discuss.elastic.co/u/rugenl)\
**Replies:** 12\
**Last updated:** [May 27, 2022, 2:19am UTC](https://discuss.elastic.co/t/date-math-in-index-name-error-in-8-1-3/305186 "2022-05-27T02:19:31Z")

</div>

Per the doc, I'm trying to create an index with the date in it's name: PUT /%3Call-dns-%7Bnow%2Fd%7D%-0000013E?pretty { "aliases": { "all-dns": { "is\_write\_index": true } } } But I'm getting this erro…

---

## [Custom sorting query results by index name with scripting](https://discuss.elastic.co/t/custom-sorting-query-results-by-index-name-with-scripting/306176)

<div class="topic-metadata">

**Author:** [@corndog](https://discuss.elastic.co/u/corndog)\
**Replies:** 0\
**Last updated:** [June 2, 2022, 1:29am UTC](https://discuss.elastic.co/t/custom-sorting-query-results-by-index-name-with-scripting/306176 "2022-06-02T01:29:55Z")

</div>

I have 4 indexes: first, second, third, fourth. I have a query that searches text on a field called "name" against all indexes. POST /\_all/\_search?pretty { "\_source": \["name"\], "query": { "match": { "nam…

---

## [Fleet Managed Pipelines and Indexes](https://discuss.elastic.co/t/fleet-managed-pipelines-and-indexes/306058)

<div class="topic-metadata">

**Author:** [@kinderrs](https://discuss.elastic.co/u/kinderrs)\
**Replies:** 0\
**Last updated:** [May 31, 2022, 5:44pm UTC](https://discuss.elastic.co/t/fleet-managed-pipelines-and-indexes/306058 "2022-05-31T17:44:54Z")

</div>

I have the integration for Nginx installed on my cloud deployment, monitoring and ingesting logs from a container deployment of the Nginx proxy. The integration for Nginx appears to be looking for an access log format t…

---

## [Sort multi-index query by index name alphabetically](https://discuss.elastic.co/t/sort-multi-index-query-by-index-name-alphabetically/306171)

<div class="topic-metadata">

**Author:** [@corndog](https://discuss.elastic.co/u/corndog)\
**Replies:** 0\
**Last updated:** [June 1, 2022, 10:55pm UTC](https://discuss.elastic.co/t/sort-multi-index-query-by-index-name-alphabetically/306171 "2022-06-01T22:55:35Z")

</div>

In other words, how can I "boost" indices based on their alphabetical order?

---

## [Merging multiple queries](https://discuss.elastic.co/t/merging-multiple-queries/306099)

<div class="topic-metadata">

**Author:** [@Krishna\_Sai\_Nag\_G](https://discuss.elastic.co/u/Krishna_Sai_Nag_G)\
**Replies:** 1\
**Last updated:** [June 1, 2022, 9:49pm UTC](https://discuss.elastic.co/t/merging-multiple-queries/306099 "2022-06-01T21:49:49Z")

</div>

I have 3 queries as following First query gives us the file name of the content we search. First query GET all\_files/\_search?scroll=1m { "\_source": "file.filename", "query": { "match\_phrase": { "content": { "que…

---

## [FSCrawler - OCR not working anymore in 2.9 without Tesseract location in PATH](https://discuss.elastic.co/t/fscrawler-ocr-not-working-anymore-in-2-9-without-tesseract-location-in-path/306128)

<div class="topic-metadata">

**Author:** [@HaroldH](https://discuss.elastic.co/u/HaroldH)\
**Replies:** 1\
**Last updated:** [June 1, 2022, 9:46pm UTC](https://discuss.elastic.co/t/fscrawler-ocr-not-working-anymore-in-2-9-without-tesseract-location-in-path/306128 "2022-06-01T21:46:54Z")

</div>

Hello, Upgrading FSCrawler from 2.7 to 2.9 I noticed that with our configuration OCR wasn't working anymore. In our \_settings.yaml file we set the path to Tesseract we like below: ocr: language: "eng+nld" pat…

---

## [Cannot import elastic RPM GPG key on EL9](https://discuss.elastic.co/t/cannot-import-elastic-rpm-gpg-key-on-el9/306164)

<div class="topic-metadata">

**Author:** [@opoplawski](https://discuss.elastic.co/u/opoplawski)\
**Replies:** 0\
**Last updated:** [June 1, 2022, 9:32pm UTC](https://discuss.elastic.co/t/cannot-import-elastic-rpm-gpg-key-on-el9/306164 "2022-06-01T21:32:14Z")

</div>

On AlmaLinux 9.0: # rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-elasticsearch error: /etc/pki/rpm-gpg/RPM-GPG-KEY-elasticsearch: key 1 import failed. I believe this is due to newer restrictions on RPM GPG keys in EL9.

---

## [Index out of bound exception on aggregation](https://discuss.elastic.co/t/index-out-of-bound-exception-on-aggregation/303763)

<div class="topic-metadata">

**Author:** [@Bob\_Strickland](https://discuss.elastic.co/u/Bob_Strickland)\
**Replies:** 1\
**Last updated:** [June 1, 2022, 9:23pm UTC](https://discuss.elastic.co/t/index-out-of-bound-exception-on-aggregation/303763 "2022-06-01T21:23:32Z")

</div>

Working on a small index that has 1556 documents. We are getting an exception when running the following: GET search\_stage\_jacked\_backup\_3/\_search?&error\_trace=true { "aggs": { "parentDealerName": { "terms"…

---

## [Has\_parent query performance](https://discuss.elastic.co/t/has-parent-query-performance/306107)

<div class="topic-metadata">

**Author:** [@maariolopezz](https://discuss.elastic.co/u/maariolopezz)\
**Replies:** 0\
**Last updated:** [June 1, 2022, 10:00am UTC](https://discuss.elastic.co/t/has-parent-query-performance/306107 "2022-06-01T10:00:01Z")

</div>

Hello everyone, I have a case where I have two types of documents (Doc1 & Doc2). There are about 100 Doc1 (parent) and 2000000 Doc2 (child) and in the case of Doc1 they have duplicated data from other Doc1s and this dat…

---

## [Compare two large indexes with transform preview](https://discuss.elastic.co/t/compare-two-large-indexes-with-transform-preview/306149)

<div class="topic-metadata">

**Author:** [@szaby20](https://discuss.elastic.co/u/szaby20)\
**Replies:** 0\
**Last updated:** [June 1, 2022, 4:30pm UTC](https://discuss.elastic.co/t/compare-two-large-indexes-with-transform-preview/306149 "2022-06-01T16:30:52Z")

</div>

Hi, I'm pretty new to Elastic so please bear with me. I'm trying to compare two large indexes (1.7 million and 400k) for regression testing purposes, which should contain exactly the same data once the larger index is fi…

---

## [Can not get run Elasticsearch 6 on my MAC](https://discuss.elastic.co/t/can-not-get-run-elasticsearch-6-on-my-mac/301707)

<div class="topic-metadata">

**Author:** [@Sajjad\_Murtaza](https://discuss.elastic.co/u/Sajjad_Murtaza)\
**Replies:** 16\
**Last updated:** [June 1, 2022, 3:50pm UTC](https://discuss.elastic.co/t/can-not-get-run-elasticsearch-6-on-my-mac/301707 "2022-06-01T15:50:55Z")

</div>

Hi all, I can not get run Elasticsearch 6 on my MAC ➜ ~ brew services list Name Status User File dbus none …

---

## [ElasticSearch pagination - from/size vs Search After for number of hits less than 10k](https://discuss.elastic.co/t/elasticsearch-pagination-from-size-vs-search-after-for-number-of-hits-less-than-10k/305855)

<div class="topic-metadata">

**Author:** [@ano](https://discuss.elastic.co/u/ano)\
**Replies:** 4\
**Last updated:** [June 1, 2022, 3:16pm UTC](https://discuss.elastic.co/t/elasticsearch-pagination-from-size-vs-search-after-for-number-of-hits-less-than-10k/305855 "2022-06-01T15:16:52Z")

</div>

Hi, I'm using Elasticsearch, and for paginating the search results, should I use the simple from/size, or should I go with search after. I've read that if the number of hits is less than 10k, then from/size is acceptabl…

---

## [Open Source Java Client XPack Security SSL Example](https://discuss.elastic.co/t/open-source-java-client-xpack-security-ssl-example/306075)

<div class="topic-metadata">

**Author:** [@nek4life](https://discuss.elastic.co/u/nek4life)\
**Replies:** 3\
**Last updated:** [June 1, 2022, 1:24pm UTC](https://discuss.elastic.co/t/open-source-java-client-xpack-security-ssl-example/306075 "2022-06-01T13:24:08Z")

</div>

I'm trying to use the new Java Client and running into issues when trying to connect to Elasticsearch running in a docker container now that xpack security is turned on by default. I'm getting the following error here. …

---

## [What does that \* in my node means?](https://discuss.elastic.co/t/what-does-that-in-my-node-means/306125)

<div class="topic-metadata">

**Author:** [@SamuelSMendes](https://discuss.elastic.co/u/SamuelSMendes)\
**Replies:** 2\
**Last updated:** [June 1, 2022, 1:48pm UTC](https://discuss.elastic.co/t/what-does-that-in-my-node-means/306125 "2022-06-01T13:48:55Z")

</div>

I've been trying out working with more than one node and once checked them in DevTools I found this \* in one of my nodes. It's a silly thing but I want to avoid any misconception, so what does it mean?

---

## [Subselect filter for aggragation](https://discuss.elastic.co/t/subselect-filter-for-aggragation/306054)

<div class="topic-metadata">

**Author:** [@frankmontyne](https://discuss.elastic.co/u/frankmontyne)\
**Replies:** 2\
**Last updated:** [June 1, 2022, 1:24pm UTC](https://discuss.elastic.co/t/subselect-filter-for-aggragation/306054 "2022-06-01T13:24:42Z")

</div>

Hi, I have been searching for a way to solve the following problem by performing a query or aggregation instead of looping through the data and filtering the results myself. I haven't found a solution up until now and w…

---

## [Java for Elasticsearch version](https://discuss.elastic.co/t/java-for-elasticsearch-version/306094)

<div class="topic-metadata">

**Author:** [@Wan\_Nur\_Athirah\_Wan](https://discuss.elastic.co/u/Wan_Nur_Athirah_Wan)\
**Replies:** 2\
**Last updated:** [June 1, 2022, 12:04pm UTC](https://discuss.elastic.co/t/java-for-elasticsearch-version/306094 "2022-06-01T12:04:52Z")

</div>

Hai. I have a question here. Before this im using Elasticsearch version 7.3.1 with java 11. Now after I upgraded Elasticsearch to version 7.17.1, i accidentally upgrade the java also which java 17. Is there any impact o…

---

## [Use the java API client to connect to an ES instance at a given URL](https://discuss.elastic.co/t/use-the-java-api-client-to-connect-to-an-es-instance-at-a-given-url/305622)

<div class="topic-metadata">

**Author:** [@vmassol](https://discuss.elastic.co/u/vmassol)\
**Replies:** 5\
**Last updated:** [June 1, 2022, 11:42am UTC](https://discuss.elastic.co/t/use-the-java-api-client-to-connect-to-an-es-instance-at-a-given-url/305622 "2022-06-01T11:42:25Z")

</div>

Hi, I'm migrating XWiki to use the new Java API client with ES 8.2.0 and I can't find a way to tell the API to connect to a URL (https://domainname/path). If I use RestClient restClient = RestClient.builder(HttpHost.cr…

---

## [Aggregation over collapsed field inner\_hits?](https://discuss.elastic.co/t/aggregation-over-collapsed-field-inner-hits/305980)

<div class="topic-metadata">

**Author:** [@Evelyn\_Gillie](https://discuss.elastic.co/u/Evelyn_Gillie)\
**Replies:** 1\
**Last updated:** [June 1, 2022, 11:24am UTC](https://discuss.elastic.co/t/aggregation-over-collapsed-field-inner-hits/305980 "2022-06-01T11:24:44Z")

</div>

Listing: item\_id seller\_id price I want to group together all listings for the same item, and show the average price across all sellers. I'm using field collapsing on item\_id, but is there a way to to compute the…

---

## [Best way to retrieve multiple fields for a set of field values](https://discuss.elastic.co/t/best-way-to-retrieve-multiple-fields-for-a-set-of-field-values/304954)

<div class="topic-metadata">

**Author:** [@Adriann](https://discuss.elastic.co/u/Adriann)\
**Replies:** 7\
**Last updated:** [June 1, 2022, 11:15am UTC](https://discuss.elastic.co/t/best-way-to-retrieve-multiple-fields-for-a-set-of-field-values/304954 "2022-06-01T11:15:29Z")

</div>

Hello, I need to get from Elasticsearch specific fields for some number of hosts. This is my current approach where I prefer the list of "host.hostname" fields and "size" based on the size of list. """ { …

---

## [UnknownHostException while connecting to Elasticsearch](https://discuss.elastic.co/t/unknownhostexception-while-connecting-to-elasticsearch/305770)

<div class="topic-metadata">

**Author:** [@Enomine](https://discuss.elastic.co/u/Enomine)\
**Replies:** 9\
**Last updated:** [June 1, 2022, 11:04am UTC](https://discuss.elastic.co/t/unknownhostexception-while-connecting-to-elasticsearch/305770 "2022-06-01T11:04:52Z")

</div>

Hi, while doing my first steps with the tutorial i face much problems even executing the first lines of code. I get an java.net.UnknownHostException that says "Der angegebene Host ist unbekannt (https://xxx.yyyzzz.co…

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

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