# Elasticsearch

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

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

**Page:** 507

---

## [Elasticsearch top\_hits aggregation result and doc\_count are different](https://discuss.elastic.co/t/elasticsearch-top-hits-aggregation-result-and-doc-count-are-different/293400)

<div class="topic-metadata">

**Author:** [@hyun](https://discuss.elastic.co/u/hyun)\
**Replies:** 2\
**Last updated:** [January 23, 2022, 11:33pm UTC](https://discuss.elastic.co/t/elasticsearch-top-hits-aggregation-result-and-doc-count-are-different/293400 "2022-01-23T23:33:56Z")

</div>

Query GET /someindex/\_search { "size": 0, "query": { "ids": { "types": \[\], "values": \["08a2","08a3","03a2","03a3","84a1"\] } }, "aggregations": { "498": { "terms":…

---

## [Recreate index from GET mappings output](https://discuss.elastic.co/t/recreate-index-from-get-mappings-output/295159)

<div class="topic-metadata">

**Author:** [@markrity](https://discuss.elastic.co/u/markrity)\
**Replies:** 0\
**Last updated:** [January 23, 2022, 8:30pm UTC](https://discuss.elastic.co/t/recreate-index-from-get-mappings-output/295159 "2022-01-23T20:30:26Z")

</div>

I'm trying to find a way to recreate all index mappings from when I use GET /\_all/\_mapping or iterate over each index. For creating development cluster purposes. I have tried to use the json I get from get all mappings…

---

## [Getting every 2nd element from \_source](https://discuss.elastic.co/t/getting-every-2nd-element-from-source/295123)

<div class="topic-metadata">

**Author:** [@EnJay](https://discuss.elastic.co/u/EnJay)\
**Replies:** 6\
**Last updated:** [January 23, 2022, 6:19pm UTC](https://discuss.elastic.co/t/getting-every-2nd-element-from-source/295123 "2022-01-23T18:19:25Z")

</div>

Hello dear community. I have been looking for information for a very long time. I need to make mapping from search for every 2nd element. For example, I have "size": 1000, while I want to get every second element as a …

---

## [UnexpectedElasticsearchClientException](https://discuss.elastic.co/t/unexpectedelasticsearchclientexception/294794)

<div class="topic-metadata">

**Author:** [@Katgust](https://discuss.elastic.co/u/Katgust)\
**Replies:** 1\
**Last updated:** [January 23, 2022, 10:42am UTC](https://discuss.elastic.co/t/unexpectedelasticsearchclientexception/294794 "2022-01-23T10:42:22Z")

</div>

Im getting the following error Elasticsearch.Net.UnexpectedElasticsearchClientException: Message: expected:'{', actual:'" "', at offset:390 I understand the reason why but I'm not sure if it's solvable. Im trying to g…

---

## [Data to large](https://discuss.elastic.co/t/data-to-large/295133)

<div class="topic-metadata">

**Author:** [@eden\_shirazi](https://discuss.elastic.co/u/eden_shirazi)\
**Replies:** 1\
**Last updated:** [January 23, 2022, 8:36am UTC](https://discuss.elastic.co/t/data-to-large/295133 "2022-01-23T08:36:05Z")

</div>

Hi, I have Elasticsearch cluster version 5.1.2 on windows 2012 r2 server. One of the servers in the cluster having an issue that I don't know how to solve... (i'm new at the elastic) In the log file it seems like that…

---

## [Intermittent issues with Elasticsearch. Where do I even start?](https://discuss.elastic.co/t/intermittent-issues-with-elasticsearch-where-do-i-even-start/295064)

<div class="topic-metadata">

**Author:** [@Henrik41](https://discuss.elastic.co/u/Henrik41)\
**Replies:** 5\
**Last updated:** [January 23, 2022, 6:18am UTC](https://discuss.elastic.co/t/intermittent-issues-with-elasticsearch-where-do-i-even-start/295064 "2022-01-23T06:18:27Z")

</div>

Using Magento 2.3.4 Elasticsearch 7.16.3 java 1.8.0\_312 I installed it on Ubuntu 20.04 with 2cpu and 2g RAM. /etc/default/Elasticsearch ES\_HEAP\_SIZE=1g ES\_STARTUP\_SLEEP\_TIME=5 MAX\_OPEN\_FILES=65535 MAX\_LOCKED\_MEM…

---

## [How to keep 3 numbers for all shards？](https://discuss.elastic.co/t/how-to-keep-3-numbers-for-all-shards/295125)

<div class="topic-metadata">

**Author:** [@wajika](https://discuss.elastic.co/u/wajika)\
**Replies:** 1\
**Last updated:** [January 23, 2022, 3:26am UTC](https://discuss.elastic.co/t/how-to-keep-3-numbers-for-all-shards/295125 "2022-01-23T03:26:01Z")

</div>

I have three nodes, and I want to maintain 3 primary shards and 1 replica for each index on the cluster. I know that I can specify a template by setting a template and logstash output, but is there a way to do it once an…

---

## [Kibana shows indices in gb size!](https://discuss.elastic.co/t/kibana-shows-indices-in-gb-size/295042)

<div class="topic-metadata">

**Author:** [@Akanksha\_Pandey](https://discuss.elastic.co/u/Akanksha_Pandey)\
**Replies:** 8\
**Last updated:** [January 22, 2022, 2:10pm UTC](https://discuss.elastic.co/t/kibana-shows-indices-in-gb-size/295042 "2022-01-22T14:10:29Z")

</div>

Hi, My Elasticsearch version 7.9.2. I'm using Filebeat to ship logs directly to Elasticsearch. All the services are running as docker container- Elasticsearch, Filebeat, Kibana The issue is- some of the Kibana indices…

---

## [Some words are not searched by elasticsearch](https://discuss.elastic.co/t/some-words-are-not-searched-by-elasticsearch/295100)

<div class="topic-metadata">

**Author:** [@Amir\_Faramarzi](https://discuss.elastic.co/u/Amir_Faramarzi)\
**Replies:** 4\
**Last updated:** [January 22, 2022, 6:16am UTC](https://discuss.elastic.co/t/some-words-are-not-searched-by-elasticsearch/295100 "2022-01-22T06:16:41Z")

</div>

Hello I have noticed that some of the words that the user searches for are not searched by Elasticsearch For example, if the user searches for machine L, Elasticsearch only searches for L and does not search for the wo…

---

## [Which is better in terms of performance? one wildcard or six matches](https://discuss.elastic.co/t/which-is-better-in-terms-of-performance-one-wildcard-or-six-matches/295057)

<div class="topic-metadata">

**Author:** [@Amir\_Faramarzi](https://discuss.elastic.co/u/Amir_Faramarzi)\
**Replies:** 0\
**Last updated:** [January 21, 2022, 1:09pm UTC](https://discuss.elastic.co/t/which-is-better-in-terms-of-performance-one-wildcard-or-six-matches/295057 "2022-01-21T13:09:42Z")

</div>

Hello Based on the words searched by the user, I want to prioritize products whose matched words are closer to the beginning of the product name. For example, if we have two products as follows "Samsung mobile phone c…

---

## [Migration Deprecation for Phantom Index Templates](https://discuss.elastic.co/t/migration-deprecation-for-phantom-index-templates/295096)

<div class="topic-metadata">

**Author:** [@cspencer](https://discuss.elastic.co/u/cspencer)\
**Replies:** 0\
**Last updated:** [January 21, 2022, 8:29pm UTC](https://discuss.elastic.co/t/migration-deprecation-for-phantom-index-templates/295096 "2022-01-21T20:29:54Z")

</div>

I just upgraded my Elasticsearch cluster from 7.13.4 to 7.16.3 . After upgrading all nodes in the cluster, I checked the migration deprecations endpoint and found this warning: GET \_migration/deprecations { "cluster\_se…

---

## [How snapshots works when using different Storage Class (GCS)?](https://discuss.elastic.co/t/how-snapshots-works-when-using-different-storage-class-gcs/294753)

<div class="topic-metadata">

**Author:** [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Replies:** 2\
**Last updated:** [January 21, 2022, 8:07pm UTC](https://discuss.elastic.co/t/how-snapshots-works-when-using-different-storage-class-gcs/294753 "2022-01-21T20:07:39Z")

</div>

Hello, Currently I'm using snapshot repositories stored in Google Cloud Storage that was created with the standard storage class. Now I have the need to create new snapshots on another Google Cloud project and I was th…

---

## [Limit of total fields \[1000\] in index exceeded](https://discuss.elastic.co/t/limit-of-total-fields-1000-in-index-exceeded/295093)

<div class="topic-metadata">

**Author:** [@galion96](https://discuss.elastic.co/u/galion96)\
**Replies:** 0\
**Last updated:** [January 21, 2022, 6:33pm UTC](https://discuss.elastic.co/t/limit-of-total-fields-1000-in-index-exceeded/295093 "2022-01-21T18:33:11Z")

</div>

Hello, I saw that there are some concerns to raising the total limit on fields above 1000. I have a situation where I am not sure how to approach it from the design point of view. I lots simple key value pairs: key1:1…

---

## [Querying on multiple flattened sub-fields for an array of items](https://discuss.elastic.co/t/querying-on-multiple-flattened-sub-fields-for-an-array-of-items/294990)

<div class="topic-metadata">

**Author:** [@robert-n-stewart](https://discuss.elastic.co/u/robert-n-stewart)\
**Replies:** 4\
**Last updated:** [January 21, 2022, 5:00pm UTC](https://discuss.elastic.co/t/querying-on-multiple-flattened-sub-fields-for-an-array-of-items/294990 "2022-01-21T17:00:01Z")

</div>

If I have a flattened or object field named X, which is an array of objects with subfields A and B, how can I query for an item that has specific values for both A and B? E.g. if I run the following: { "query": { …

---

## [With xpack security enabled i can't run a custom plugin - what should change in that plugin?](https://discuss.elastic.co/t/with-xpack-security-enabled-i-cant-run-a-custom-plugin-what-should-change-in-that-plugin/295083)

<div class="topic-metadata">

**Author:** [@LucaL](https://discuss.elastic.co/u/LucaL)\
**Replies:** 0\
**Last updated:** [January 21, 2022, 3:50pm UTC](https://discuss.elastic.co/t/with-xpack-security-enabled-i-cant-run-a-custom-plugin-what-should-change-in-that-plugin/295083 "2022-01-21T15:50:01Z")

</div>

Hello, dev sent me a plugin to install on Elasticsearch installed via Elastic Stack Operator on Kubernetes with all security features enabled (authentication, https, etc.). What happens is that plugin, previously worki…

---

## [Question on replica shards](https://discuss.elastic.co/t/question-on-replica-shards/295076)

<div class="topic-metadata">

**Author:** [@Pradyumna\_Achar](https://discuss.elastic.co/u/Pradyumna_Achar)\
**Replies:** 0\
**Last updated:** [January 21, 2022, 3:32pm UTC](https://discuss.elastic.co/t/question-on-replica-shards/295076 "2022-01-21T15:32:11Z")

</div>

Hello, I have a question regarding replica shards. As I understand, a write to the primary gets propagated to replicas on other nodes via requests that use the same write pool and the same write queue as user-initiated …

---

## [Missing index setting in the new Java Client](https://discuss.elastic.co/t/missing-index-setting-in-the-new-java-client/294739)

<div class="topic-metadata">

**Author:** [@jdrossl](https://discuss.elastic.co/u/jdrossl)\
**Replies:** 6\
**Last updated:** [January 21, 2022, 2:19pm UTC](https://discuss.elastic.co/t/missing-index-setting-in-the-new-java-client/294739 "2022-01-21T14:19:06Z")

</div>

Hi everyone! I'm working on a migration from the RHLC to the new Java Client and most of it went fine but it seems like there is a whole section missing for Index Settings (index.mapping.\*) is this intentional or someth…

---

## [Retreive all documents of specific index from ES with snapshot](https://discuss.elastic.co/t/retreive-all-documents-of-specific-index-from-es-with-snapshot/295034)

<div class="topic-metadata">

**Author:** [@Hyeongjun\_Kim](https://discuss.elastic.co/u/Hyeongjun_Kim)\
**Replies:** 1\
**Last updated:** [January 21, 2022, 11:45am UTC](https://discuss.elastic.co/t/retreive-all-documents-of-specific-index-from-es-with-snapshot/295034 "2022-01-21T11:45:13Z")

</div>

Hello, I want to extract all documents from ES index. More than 6M documents are stored in target index. In order to get all documents with scroll or search\_after API, I have to send lots of search requests. Many sear…

---

## [Vector tiles search not returning hits on geo\_shape fields](https://discuss.elastic.co/t/vector-tiles-search-not-returning-hits-on-geo-shape-fields/294926)

<div class="topic-metadata">

**Author:** [@henri.normak](https://discuss.elastic.co/u/henri.normak)\
**Replies:** 11\
**Last updated:** [January 21, 2022, 11:33am UTC](https://discuss.elastic.co/t/vector-tiles-search-not-returning-hits-on-geo-shape-fields/294926 "2022-01-21T11:33:28Z")

</div>

The index mapping being used is equivalent to this one (simplified): PUT locations { "mappings": { "properties": { "geoshape": { "type": "geo\_shape" } } } } There is a specific document …

---

## [Automate Deletion of Docs from an Index that are older than 10 days](https://discuss.elastic.co/t/automate-deletion-of-docs-from-an-index-that-are-older-than-10-days/293826)

<div class="topic-metadata">

**Author:** [@Divyank\_Mahalle](https://discuss.elastic.co/u/Divyank_Mahalle)\
**Replies:** 3\
**Last updated:** [January 21, 2022, 11:20am UTC](https://discuss.elastic.co/t/automate-deletion-of-docs-from-an-index-that-are-older-than-10-days/293826 "2022-01-21T11:20:33Z")

</div>

Hi, Currently, I am deleting docs using DSL queries that are older than 10 days. I am having a 1P shard on a single node with No replicas or nodes for this env. DSL query- POST index\_name/\_delete\_by\_query { "query": …

---

## [Change the default precision\_threshold from 3000 to 40000](https://discuss.elastic.co/t/change-the-default-precision-threshold-from-3000-to-40000/295038)

<div class="topic-metadata">

**Author:** [@zevodku](https://discuss.elastic.co/u/zevodku)\
**Replies:** 0\
**Last updated:** [January 21, 2022, 9:03am UTC](https://discuss.elastic.co/t/change-the-default-precision-threshold-from-3000-to-40000/295038 "2022-01-21T09:03:59Z")

</div>

Hello folks, Is there any way to change the default precision\_threshold from "3000" to "40000" as a global thing? Like in the configuration files (Elasticsearch.yml or kibana.yml)? I'm using cardinality extensively and…

---

## [Multi field custom elasticsearch analyzer](https://discuss.elastic.co/t/multi-field-custom-elasticsearch-analyzer/294613)

<div class="topic-metadata">

**Author:** [@dishant.sharma](https://discuss.elastic.co/u/dishant.sharma)\
**Replies:** 2\
**Last updated:** [January 21, 2022, 8:54am UTC](https://discuss.elastic.co/t/multi-field-custom-elasticsearch-analyzer/294613 "2022-01-21T08:54:40Z")

</div>

I am creating an Elasticsearch plugin. I want to analyze a url in two different ways using the same analyzer that is pattern analyzer but with different regular expressions for getting different tokens. I have started c…

---

## [Enrichment - is it the best way?](https://discuss.elastic.co/t/enrichment-is-it-the-best-way/294802)

<div class="topic-metadata">

**Author:** [@jkulcsar](https://discuss.elastic.co/u/jkulcsar)\
**Replies:** 3\
**Last updated:** [January 21, 2022, 8:44am UTC](https://discuss.elastic.co/t/enrichment-is-it-the-best-way/294802 "2022-01-21T08:44:27Z")

</div>

Hello all, We've been using Elastic in capturing and consolidating IoT data however - my experience with Elastic is however limited to about 6 months. Consider the scenario: large number of IoT devices with known s…

---

## [Lower case problem in field names](https://discuss.elastic.co/t/lower-case-problem-in-field-names/295026)

<div class="topic-metadata">

**Author:** [@Busra\_Duygu](https://discuss.elastic.co/u/Busra_Duygu)\
**Replies:** 1\
**Last updated:** [January 21, 2022, 8:42am UTC](https://discuss.elastic.co/t/lower-case-problem-in-field-names/295026 "2022-01-21T08:42:41Z")

</div>

Hello dear friends, I have a problem, if you can help me I would be very happy. The problem is that; I reindexed from an existing index. While reindexing, there was a capitalization problem in the field names, so I added…

---

## [How to migrate from version 7.12 to version 7.16.2?](https://discuss.elastic.co/t/how-to-migrate-from-version-7-12-to-version-7-16-2/293964)

<div class="topic-metadata">

**Author:** [@wajika](https://discuss.elastic.co/u/wajika)\
**Replies:** 5\
**Last updated:** [January 21, 2022, 7:52am UTC](https://discuss.elastic.co/t/how-to-migrate-from-version-7-12-to-version-7-16-2/293964 "2022-01-21T07:52:31Z")

</div>

7.12 cluster 7.16 I made a snapshot on the 7.12 cluster, shared the snapshot using NFS, then created a new 7.16 cluster, mounted the nfs path, and registered the warehouse with the same name on kibana. After …

---

## [Elasticsearch disk based shard allocation tuning](https://discuss.elastic.co/t/elasticsearch-disk-based-shard-allocation-tuning/293616)

<div class="topic-metadata">

**Author:** [@tarund](https://discuss.elastic.co/u/tarund)\
**Replies:** 4\
**Last updated:** [January 21, 2022, 5:38am UTC](https://discuss.elastic.co/t/elasticsearch-disk-based-shard-allocation-tuning/293616 "2022-01-21T05:38:50Z")

</div>

I am running 2 node Elasticsearch cluster v7.9.2 Ingesting data through APM-Server v7.15.0, creates ~50 new indices daily with pattern apm-7.15.0-\<service.name\>-transaction-YYYY.MM.DD Observing that all new primary sh…

---

## [Using .Net client or low level client to create an seach engine in Search App running on Docker](https://discuss.elastic.co/t/using-net-client-or-low-level-client-to-create-an-seach-engine-in-search-app-running-on-docker/295001)

<div class="topic-metadata">

**Author:** [@shahabj13](https://discuss.elastic.co/u/shahabj13)\
**Replies:** 0\
**Last updated:** [January 21, 2022, 12:11am UTC](https://discuss.elastic.co/t/using-net-client-or-low-level-client-to-create-an-seach-engine-in-search-app-running-on-docker/295001 "2022-01-21T00:11:50Z")

</div>

I have Elasticsearch running on Docker in three nodes (9200, 3002 and 5601). I can send http request to 3002 endpoint from .Net and Postman to create a new engine. But I want to use Nest client or low level client to d…

---

## [Global Search](https://discuss.elastic.co/t/global-search/294887)

<div class="topic-metadata">

**Author:** [@Prabakar](https://discuss.elastic.co/u/Prabakar)\
**Replies:** 6\
**Last updated:** [January 20, 2022, 4:59pm UTC](https://discuss.elastic.co/t/global-search/294887 "2022-01-20T16:59:25Z")

</div>

Hello Everyone, I would like to perform a global search by providing a keyword like below (2 different requests) in the request. It returns the result which matches the word "pizza" in any of the field. But if I give "p…

---

## [Elasticsearch endpoint is giving me \`My connection to this website is not secured\` on elastic cloud!](https://discuss.elastic.co/t/elasticsearch-endpoint-is-giving-me-my-connection-to-this-website-is-not-secured-on-elastic-cloud/294777)

<div class="topic-metadata">

**Author:** [@Hassan\_Shaitou1](https://discuss.elastic.co/u/Hassan_Shaitou1)\
**Replies:** 2\
**Last updated:** [January 20, 2022, 8:03pm UTC](https://discuss.elastic.co/t/elasticsearch-endpoint-is-giving-me-my-connection-to-this-website-is-not-secured-on-elastic-cloud/294777 "2022-01-20T20:03:49Z")

</div>

So I am getting this error My connection to this website is not secured when routing to the Elasticsearch endpoint before logging in, after logging in I can see that my elastic endpoint is certified correctly and secured…

---

## [How to increase number of shards in parallel that are initializing or relocating](https://discuss.elastic.co/t/how-to-increase-number-of-shards-in-parallel-that-are-initializing-or-relocating/294946)

<div class="topic-metadata">

**Author:** [@lecko](https://discuss.elastic.co/u/lecko)\
**Replies:** 1\
**Last updated:** [January 20, 2022, 7:59pm UTC](https://discuss.elastic.co/t/how-to-increase-number-of-shards-in-parallel-that-are-initializing-or-relocating/294946 "2022-01-20T19:59:47Z")

</div>

Hello. I use Elasticsearch 6.8 in a cluster of 8 servers. Sometimes I need to do some hardware task on one of servers and need to move shards from that node to others or initilaize them on other nodes. Before start I ru…

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

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