# Elasticsearch

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

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

**Page:** 540

---

## [How to Find a document with maximum number of fields in ElasticSearch](https://discuss.elastic.co/t/how-to-find-a-document-with-maximum-number-of-fields-in-elasticsearch/289593)

<div class="topic-metadata">

**Author:** [@amars39](https://discuss.elastic.co/u/amars39)\
**Replies:** 0\
**Last updated:** [November 18, 2021, 1:19pm UTC](https://discuss.elastic.co/t/how-to-find-a-document-with-maximum-number-of-fields-in-elasticsearch/289593 "2021-11-18T13:19:25Z")

</div>

Hi, we are trying to find a document in elastic index with maximum number of fields , my document is below format . is there any way to get the document or the highest number of fields count in the document. { "caseId"…

---

## [How to remove write-lock for elasticsearch segment after reindexing?](https://discuss.elastic.co/t/how-to-remove-write-lock-for-elasticsearch-segment-after-reindexing/289580)

<div class="topic-metadata">

**Author:** [@Adarsh\_Nair](https://discuss.elastic.co/u/Adarsh_Nair)\
**Replies:** 3\
**Last updated:** [November 18, 2021, 11:35am UTC](https://discuss.elastic.co/t/how-to-remove-write-lock-for-elasticsearch-segment-after-reindexing/289580 "2021-11-18T11:35:15Z")

</div>

How to remove write-lock for elasticsearch segment after reindexing? Looking at the stack trace there is a missing Lucene file which is not good. Did this index/shard have any docs in it before shutdown? Can you list …

---

## [Index management](https://discuss.elastic.co/t/index-management/289444)

<div class="topic-metadata">

**Author:** [@tractor\_boy](https://discuss.elastic.co/u/tractor_boy)\
**Replies:** 4\
**Last updated:** [November 18, 2021, 11:24am UTC](https://discuss.elastic.co/t/index-management/289444 "2021-11-18T11:24:12Z")

</div>

I am reading through the documentation and cannot find a section that describes how to set up date retention, such that data is deleted as it ages. I believe its possible to slim data down over time, but i've not yet se…

---

## [How to remove write-lock in elasticsearch segment after re-indexing](https://discuss.elastic.co/t/how-to-remove-write-lock-in-elasticsearch-segment-after-re-indexing/289545)

<div class="topic-metadata">

**Author:** [@Adarsh\_Nair](https://discuss.elastic.co/u/Adarsh_Nair)\
**Replies:** 1\
**Last updated:** [November 18, 2021, 11:02am UTC](https://discuss.elastic.co/t/how-to-remove-write-lock-in-elasticsearch-segment-after-re-indexing/289545 "2021-11-18T11:02:42Z")

</div>

Caused by: java.io.FileNotFoundException: no segments\* file found in store(mmapfs(E:\\nice\_systems\\RTServer\\Elasticsearch\\data\\nodes\\0\\indices\\AgGE3T0CQqmNUbTa7mgxog\\0\\index)): files: \[recovery.AXzg-JDdOOIh9tEF6n7G.\_f7t.d…

---

## [Calculate size of top hit in elasticsearch based on number of buckets](https://discuss.elastic.co/t/calculate-size-of-top-hit-in-elasticsearch-based-on-number-of-buckets/289577)

<div class="topic-metadata">

**Author:** [@Nebojsa](https://discuss.elastic.co/u/Nebojsa)\
**Replies:** 0\
**Last updated:** [November 18, 2021, 10:39am UTC](https://discuss.elastic.co/t/calculate-size-of-top-hit-in-elasticsearch-based-on-number-of-buckets/289577 "2021-11-18T10:39:07Z")

</div>

I'm filtering documents based on top left and bottom right coordinates and after that using geohash forming buckets. Each bucket has fixed number of top documents in it. I want to always show for example 60 documents, eq…

---

## [Elasticsearch SLM retention](https://discuss.elastic.co/t/elasticsearch-slm-retention/289559)

<div class="topic-metadata">

**Author:** [@pszemesy](https://discuss.elastic.co/u/pszemesy)\
**Replies:** 2\
**Last updated:** [November 18, 2021, 10:21am UTC](https://discuss.elastic.co/t/elasticsearch-slm-retention/289559 "2021-11-18T10:21:15Z")

</div>

Hi All, I have a question about the retention at SLM. If I set a retention period for an SLM Policy, the SLM will deletes all the snapshots older then the retention period. Since Elasticsearch is dealing with incremen…

---

## [Duplication data in the event](https://discuss.elastic.co/t/duplication-data-in-the-event/289567)

<div class="topic-metadata">

**Author:** [@EugeneZ](https://discuss.elastic.co/u/EugeneZ)\
**Replies:** 0\
**Last updated:** [November 18, 2021, 10:09am UTC](https://discuss.elastic.co/t/duplication-data-in-the-event/289567 "2021-11-18T10:09:41Z")

</div>

Hi guys I have some log from filebeat--logstash--\> elastic I see logs in kibana and it is strange in JSON for example: { "\_index": "test-fbt-2021.11", "\_type": "\_doc", "\_id": "dvMV\_3wBOQF85F2Xl-Y4", "\_score"…

---

## [Java Client for Spring Boot Reactive Application](https://discuss.elastic.co/t/java-client-for-spring-boot-reactive-application/289540)

<div class="topic-metadata">

**Author:** [@yash\_mahajan](https://discuss.elastic.co/u/yash_mahajan)\
**Replies:** 3\
**Last updated:** [November 18, 2021, 10:05am UTC](https://discuss.elastic.co/t/java-client-for-spring-boot-reactive-application/289540 "2021-11-18T10:05:09Z")

</div>

Hi team! Which client do you recommend for Elasticsearch for spring boot reactive app? The documentation says 7.15 high level rest client is deprecated in favour of Java API. 7.16 Java API documentation mentions that i…

---

## [Date histogram aggregation returns a wrong number of buckets and wrong start date of each bucket](https://discuss.elastic.co/t/date-histogram-aggregation-returns-a-wrong-number-of-buckets-and-wrong-start-date-of-each-bucket/289324)

<div class="topic-metadata">

**Author:** [@Helmi\_Akermi](https://discuss.elastic.co/u/Helmi_Akermi)\
**Replies:** 2\
**Last updated:** [November 18, 2021, 10:04am UTC](https://discuss.elastic.co/t/date-histogram-aggregation-returns-a-wrong-number-of-buckets-and-wrong-start-date-of-each-bucket/289324 "2021-11-18T10:04:06Z")

</div>

Elasticsearch version is 7 Code : GET /my\_alias/\_search { "from": 0, "size": 10, "query": { "bool": { "must": \[ { "range": { "timestamp": { "gte": 16364160000…

---

## [Accessing gzipped response with RestClient or RestHighLevelClient](https://discuss.elastic.co/t/accessing-gzipped-response-with-restclient-or-resthighlevelclient/289538)

<div class="topic-metadata">

**Author:** [@soren.nohr](https://discuss.elastic.co/u/soren.nohr)\
**Replies:** 3\
**Last updated:** [November 18, 2021, 9:01am UTC](https://discuss.elastic.co/t/accessing-gzipped-response-with-restclient-or-resthighlevelclient/289538 "2021-11-18T09:01:39Z")

</div>

Hi All, I am using the Java RestClient to do a search against an Elasticsearch cluster, requesting a gzipped response by setting the 'Accept-Encoding' header to 'gzip'. Using Wireshark I can see that the Elastic cluster…

---

## [Retrieve each filter response in one result](https://discuss.elastic.co/t/retrieve-each-filter-response-in-one-result/289467)

<div class="topic-metadata">

**Author:** [@uedemir](https://discuss.elastic.co/u/uedemir)\
**Replies:** 2\
**Last updated:** [November 18, 2021, 8:36am UTC](https://discuss.elastic.co/t/retrieve-each-filter-response-in-one-result/289467 "2021-11-18T08:36:37Z")

</div>

Hi, Is it possible to combine three or more filter query with each wished size and get ids of document separately in result? For example; size parameter in query is 100 and I need to get 10 documents from first of my f…

---

## [How to re configure a data stream for lowering the usage of shards](https://discuss.elastic.co/t/how-to-re-configure-a-data-stream-for-lowering-the-usage-of-shards/289530)

<div class="topic-metadata">

**Author:** [@vijayebpzr](https://discuss.elastic.co/u/vijayebpzr)\
**Replies:** 1\
**Last updated:** [November 18, 2021, 7:13am UTC](https://discuss.elastic.co/t/how-to-re-configure-a-data-stream-for-lowering-the-usage-of-shards/289530 "2021-11-18T07:13:36Z")

</div>

I have a data stream which is associated with an index template which create 3 shards per index daily. This is a time based indices which creates new index daily. We are approaching the maximum number of allowed shards i…

---

## [Reindex api request failing on Elasticsearch 6.6](https://discuss.elastic.co/t/reindex-api-request-failing-on-elasticsearch-6-6/289428)

<div class="topic-metadata">

**Author:** [@pratiksha](https://discuss.elastic.co/u/pratiksha)\
**Replies:** 4\
**Last updated:** [November 18, 2021, 5:09am UTC](https://discuss.elastic.co/t/reindex-api-request-failing-on-elasticsearch-6-6/289428 "2021-11-18T05:09:33Z")

</div>

Facing issue while running reindex api on ES v6.6. Please refer below shared output: Command: $ curl -XPOST http://\<elasticsearch-svc\>:9200/\_reindex?pretty -H 'Content-Type: application/json' -d' { "source": { "in…

---

## [Mssql server data -\> elasticsearch](https://discuss.elastic.co/t/mssql-server-data-elasticsearch/289517)

<div class="topic-metadata">

**Author:** [@Jerry\_Hoffmeister](https://discuss.elastic.co/u/Jerry_Hoffmeister)\
**Replies:** 0\
**Last updated:** [November 18, 2021, 1:03am UTC](https://discuss.elastic.co/t/mssql-server-data-elasticsearch/289517 "2021-11-18T01:03:58Z")

</div>

We currently have an application that sends it's logs to an mssql server database. I'd like to pull those logs into Elasticsearch directly from sql server similar using filebeat to import file based logs. I've looked a…

---

## [How to avoid memory leak on creating role in huge elastic instance](https://discuss.elastic.co/t/how-to-avoid-memory-leak-on-creating-role-in-huge-elastic-instance/289426)

<div class="topic-metadata">

**Author:** [@Hamidreza\_Ahmadinia](https://discuss.elastic.co/u/Hamidreza_Ahmadinia)\
**Replies:** 2\
**Last updated:** [November 17, 2021, 11:24pm UTC](https://discuss.elastic.co/t/how-to-avoid-memory-leak-on-creating-role-in-huge-elastic-instance/289426 "2021-11-17T23:24:10Z")

</div>

hi I have an Elasticsearch instane with 25,612,514,771 documents When i create role in kibana, unassigned\_shards inceases and status turn to yellow. for about 10 minutes Search Latency increases too.

---

## [Understanding extremely slow rewrite\_time due to fuzziness](https://discuss.elastic.co/t/understanding-extremely-slow-rewrite-time-due-to-fuzziness/289502)

<div class="topic-metadata">

**Author:** [@blackmad](https://discuss.elastic.co/u/blackmad)\
**Replies:** 0\
**Last updated:** [November 17, 2021, 7:47pm UTC](https://discuss.elastic.co/t/understanding-extremely-slow-rewrite-time-due-to-fuzziness/289502 "2021-11-17T19:47:00Z")

</div>

I'm managing a relatively large ES cluster and I'm struggling to understand why I'm seeing such large rewrite\_time on searches of more than a few tokens. For this nonsense query "djkh hjk hjk hjkh jhkj jhjk jkh jewrh" I…

---

## [Elasticsearch for social networking sites like instagram for user posts and likes,](https://discuss.elastic.co/t/elasticsearch-for-social-networking-sites-like-instagram-for-user-posts-and-likes/289496)

<div class="topic-metadata">

**Author:** [@MOHIT2710](https://discuss.elastic.co/u/MOHIT2710)\
**Replies:** 0\
**Last updated:** [November 17, 2021, 6:53pm UTC](https://discuss.elastic.co/t/elasticsearch-for-social-networking-sites-like-instagram-for-user-posts-and-likes/289496 "2021-11-17T18:53:10Z")

</div>

Hi Elastic team, I need your suggestions for using Elasticsearch as a search engine for my application similar to instagram or fb. Use case::If user is searching for any word that could be any post title,username,chann…

---

## [Query with wildcard](https://discuss.elastic.co/t/query-with-wildcard/289372)

<div class="topic-metadata">

**Author:** [@Wonder\_Garance](https://discuss.elastic.co/u/Wonder_Garance)\
**Replies:** 2\
**Last updated:** [November 17, 2021, 6:47pm UTC](https://discuss.elastic.co/t/query-with-wildcard/289372 "2021-11-17T18:47:53Z")

</div>

I want to generate phrase queries with wildcard, but this query returns 0 result: "query": { "bool": { "must": \[ { "query\_string": { "query": "\\"user login authen\*\\"", …

---

## [?refresh or block on the Search API](https://discuss.elastic.co/t/refresh-or-block-on-the-search-api/289382)

<div class="topic-metadata">

**Author:** [@Bryji](https://discuss.elastic.co/u/Bryji)\
**Replies:** 0\
**Last updated:** [November 17, 2021, 1:41am UTC](https://discuss.elastic.co/t/refresh-or-block-on-the-search-api/289382 "2021-11-17T01:41:22Z")

</div>

It would be nice if the Search API supported ?refresh like the Index/Update/Delete APIs, so that requests could block until a consistent result could be returned. Has this ever been discussed / proposed? Any other sugges…

---

## [SQL histogram returns unexpected offset](https://discuss.elastic.co/t/sql-histogram-returns-unexpected-offset/289187)

<div class="topic-metadata">

**Author:** [@HarmenB](https://discuss.elastic.co/u/HarmenB)\
**Replies:** 2\
**Last updated:** [November 17, 2021, 5:42pm UTC](https://discuss.elastic.co/t/sql-histogram-returns-unexpected-offset/289187 "2021-11-17T17:42:22Z")

</div>

I'm trying to create a Histogram query using the SQL language. My goal is to get 3 buckets covering 30 days each. The following query does work but gives me an unexpected offset: POST \_sql?format=txt { "query": "SELE…

---

## [Failed to start Elasticsearch.7.15.2](https://discuss.elastic.co/t/failed-to-start-elasticsearch-7-15-2/289361)

<div class="topic-metadata">

**Author:** [@tranha31](https://discuss.elastic.co/u/tranha31)\
**Replies:** 6\
**Last updated:** [November 17, 2021, 4:52pm UTC](https://discuss.elastic.co/t/failed-to-start-elasticsearch-7-15-2/289361 "2021-11-17T16:52:57Z")

</div>

I want to start Elasticsearch v7.12.1. But it is not working. I don't know what is wrong. Someone help me, please!!!!!!!! elasticsearch.service - Elasticsearch Loaded: loaded (/usr/lib/systemd/system/elasticsearch.se…

---

## [Accessing index shard directories via pylucene](https://discuss.elastic.co/t/accessing-index-shard-directories-via-pylucene/289384)

<div class="topic-metadata">

**Author:** [@Ben\_Timby](https://discuss.elastic.co/u/Ben_Timby)\
**Replies:** 4\
**Last updated:** [November 17, 2021, 4:50pm UTC](https://discuss.elastic.co/t/accessing-index-shard-directories-via-pylucene/289384 "2021-11-17T16:50:36Z")

</div>

Hi, I have old index files from Elasticsearch 1.7.6. The version of lucene utilized is 4.10.4, I was able to get lucene to open a directory that represents one of the three shards of my index. I can pull the documents fr…

---

## [Delete by query?](https://discuss.elastic.co/t/delete-by-query/289472)

<div class="topic-metadata">

**Author:** [@Saliinger](https://discuss.elastic.co/u/Saliinger)\
**Replies:** 2\
**Last updated:** [November 17, 2021, 4:27pm UTC](https://discuss.elastic.co/t/delete-by-query/289472 "2021-11-17T16:27:25Z")

</div>

Hello. :slight\_smile: I'm using delete\_by\_query to remove old data from all index. Looks like that: POST \*/\_delete\_by\_query { "query": { "bool": { "filter": \[ { "range": { "@t…

---

## [Ingest Attachment Plugin update index](https://discuss.elastic.co/t/ingest-attachment-plugin-update-index/289346)

<div class="topic-metadata">

**Author:** [@fribeiro-keep](https://discuss.elastic.co/u/fribeiro-keep)\
**Replies:** 6\
**Last updated:** [November 17, 2021, 4:00pm UTC](https://discuss.elastic.co/t/ingest-attachment-plugin-update-index/289346 "2021-11-17T16:00:56Z")

</div>

Hey there, I'm trying to implement the Ingest Attachment plugin on Elasticsearch 6.8 My goal is to append the document text to an existing index. This is a sample of my current index { "\_index": "koha\_biblios", "\_typ…

---

## [Sort on multiple fields not working](https://discuss.elastic.co/t/sort-on-multiple-fields-not-working/289478)

<div class="topic-metadata">

**Author:** [@Karthikeyan\_Amaresan](https://discuss.elastic.co/u/Karthikeyan_Amaresan)\
**Replies:** 0\
**Last updated:** [November 17, 2021, 3:56pm UTC](https://discuss.elastic.co/t/sort-on-multiple-fields-not-working/289478 "2021-11-17T15:56:22Z")

</div>

Query { "size": 20, "query": { "match\_all": {} }, "\_source": \["INBOUND\_CALL\_mod\_date", "OUTBOUND\_CALL\_mod\_date"\], "sort": \[ { "INBOUND\_CALL\_mod\_date": { "order": "desc" } }, …

---

## [Adapting ECS process field set for a process tree?](https://discuss.elastic.co/t/adapting-ecs-process-field-set-for-a-process-tree/289374)

<div class="topic-metadata">

**Author:** [@Gerry7](https://discuss.elastic.co/u/Gerry7)\
**Replies:** 1\
**Last updated:** [November 17, 2021, 3:15pm UTC](https://discuss.elastic.co/t/adapting-ecs-process-field-set-for-a-process-tree/289374 "2021-11-17T15:15:06Z")

</div>

We have a system sending alerts on process activity. The alert contains an entire process tree related to the offending process - the parent process, grand parent proces, etc. The ECS process field set has a parent node…

---

## [Elastic Search Not Starting](https://discuss.elastic.co/t/elastic-search-not-starting/289422)

<div class="topic-metadata">

**Author:** [@gang\_giz](https://discuss.elastic.co/u/gang_giz)\
**Replies:** 9\
**Last updated:** [November 17, 2021, 1:37pm UTC](https://discuss.elastic.co/t/elastic-search-not-starting/289422 "2021-11-17T13:37:37Z")

</div>

Hi, We have to install Elasticsearch 7.9 to my Cpanel Server and we have done the install and started to Start the Elasticsearch it is failed when I check the log I see this. Im pasting the Entire log in multiple threds …

---

## [RestHighLevelClient request time out not worked](https://discuss.elastic.co/t/resthighlevelclient-request-time-out-not-worked/289458)

<div class="topic-metadata">

**Author:** [@ertugrul.gamgam](https://discuss.elastic.co/u/ertugrul.gamgam)\
**Replies:** 0\
**Last updated:** [November 17, 2021, 1:35pm UTC](https://discuss.elastic.co/t/resthighlevelclient-request-time-out-not-worked/289458 "2021-11-17T13:35:10Z")

</div>

Hello I am using RestHighLevelClient 7.4.2 . I set time outs like below to test: @Bean public RestHighLevelClient restHighLevelClient() { HttpHost\[\] hosts = elasticsearchEnvironmentConfig.getNodes().stre…

---

## [Do ILM life time policies get reapplied to existing indexes?](https://discuss.elastic.co/t/do-ilm-life-time-policies-get-reapplied-to-existing-indexes/288801)

<div class="topic-metadata">

**Author:** [@riahc3](https://discuss.elastic.co/u/riahc3)\
**Replies:** 5\
**Last updated:** [November 17, 2021, 11:21am UTC](https://discuss.elastic.co/t/do-ilm-life-time-policies-get-reapplied-to-existing-indexes/288801 "2021-11-17T11:21:54Z")

</div>

Hello I was using daily named indexes (yyyy.mm.dd) with a 180 day retention period but in august I changed to a monthy (yyyy.mm) and adjusted the retention period to 210ish days in order to keep the 180 retention period…

---

## [Timeout and slow responses](https://discuss.elastic.co/t/timeout-and-slow-responses/289418)

<div class="topic-metadata">

**Author:** [@ook](https://discuss.elastic.co/u/ook)\
**Replies:** 5\
**Last updated:** [November 17, 2021, 11:18am UTC](https://discuss.elastic.co/t/timeout-and-slow-responses/289418 "2021-11-17T11:18:05Z")

</div>

Hi, I have a Elasticsearch cluster in my k8s cluster to handle a unique small (451k docs) index (here the stats: ES Cluster stats as at 20211117 · GitHub ), so small (2gb) that I use 1 shard. All 5 nodes pods have 1CPU,…

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

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