# Elasticsearch

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

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

**Page:** 1052

---

## [Incomplete reindexing](https://discuss.elastic.co/t/incomplete-reindexing/214207)

<div class="topic-metadata">

**Author:** [@reddihareesh](https://discuss.elastic.co/u/reddihareesh)\
**Replies:** 1\
**Last updated:** [January 8, 2020, 11:45am UTC](https://discuss.elastic.co/t/incomplete-reindexing/214207 "2020-01-08T11:45:29Z")

</div>

I wanted to reindex an index called test\_dupes\_2year\_double to combine a date field and a time field to add new field datetime to a new index called datetime\_srldc. POST \_reindex { "source": { "index": "test\_dupes…

---

## [How to determine "index.mapping.total\_fields.limit" in an Index in ES 6.3](https://discuss.elastic.co/t/how-to-determine-index-mapping-total-fields-limit-in-an-index-in-es-6-3/213978)

<div class="topic-metadata">

**Author:** [@Harshraj\_Shinde](https://discuss.elastic.co/u/Harshraj_Shinde)\
**Replies:** 1\
**Last updated:** [January 8, 2020, 10:52am UTC](https://discuss.elastic.co/t/how-to-determine-index-mapping-total-fields-limit-in-an-index-in-es-6-3/213978 "2020-01-08T10:52:16Z")

</div>

Hello, PUT test1 { "mappings": { "\_doc": { "properties": { "field1":{ "type":"text" }, "field2":{ "type":"text" }, "field3":{ "type":"text" } } } }, "settings": { "analysis": { "normalizer": { "Expo…

---

## [Constant Score - Multiple matches](https://discuss.elastic.co/t/constant-score-multiple-matches/214085)

<div class="topic-metadata">

**Author:** [@Ben\_Gabb](https://discuss.elastic.co/u/Ben_Gabb)\
**Replies:** 2\
**Last updated:** [January 8, 2020, 10:32am UTC](https://discuss.elastic.co/t/constant-score-multiple-matches/214085 "2020-01-08T10:32:48Z")

</div>

I have a constant score which looks into a nested field: { "from": 0, "size": 30, "query": { "constant\_score": { "boost": 100, "filter": { "nested": { "query": { "term…

---

## [Chain input Watcher multi result](https://discuss.elastic.co/t/chain-input-watcher-multi-result/213712)

<div class="topic-metadata">

**Author:** [@sholzhauer](https://discuss.elastic.co/u/sholzhauer)\
**Replies:** 1\
**Last updated:** [January 8, 2020, 10:31am UTC](https://discuss.elastic.co/t/chain-input-watcher-multi-result/213712 "2020-01-08T10:31:01Z")

</div>

Hi, I am really struggling to implement the following; I need a watcher which determines if for a username 2 different events occur after each other in a 24h window. Requirements First event: { "@version": "1", …

---

## [Can java.util.regex.Pattern be used in a painless script?](https://discuss.elastic.co/t/can-java-util-regex-pattern-be-used-in-a-painless-script/213789)

<div class="topic-metadata">

**Author:** [@Jamshid](https://discuss.elastic.co/u/Jamshid)\
**Replies:** 1\
**Last updated:** [January 8, 2020, 10:29am UTC](https://discuss.elastic.co/t/can-java-util-regex-pattern-be-used-in-a-painless-script/213789 "2020-01-08T10:29:43Z")

</div>

Is there a way to use java.util.regex.Pattern in a painless script? I get an error: curl -i -XPOST http://localhost:9200/\_scripts/painless/\_execute -H 'Content-type: application/json' --data-binary '{"script": {"source"…

---

## [Curator: What is the recommended way to change static index setting?](https://discuss.elastic.co/t/curator-what-is-the-recommended-way-to-change-static-index-setting/214004)

<div class="topic-metadata">

**Author:** [@Rajiv](https://discuss.elastic.co/u/Rajiv)\
**Replies:** 0\
**Last updated:** [January 7, 2020, 8:14am UTC](https://discuss.elastic.co/t/curator-what-is-the-recommended-way-to-change-static-index-setting/214004 "2020-01-07T08:14:03Z")

</div>

Once we rollover an index, we use Curator to mark it read-only. We use filter element "pattern" to exclude the active index as suggested in Curator documentation. Ideally, we want to filter out indices which have already…

---

## [How do I get k nearest neighbors from a numerical vector based index?](https://discuss.elastic.co/t/how-do-i-get-k-nearest-neighbors-from-a-numerical-vector-based-index/214110)

<div class="topic-metadata">

**Author:** [@hjiop\_oop](https://discuss.elastic.co/u/hjiop_oop)\
**Replies:** 1\
**Last updated:** [January 8, 2020, 10:22am UTC](https://discuss.elastic.co/t/how-do-i-get-k-nearest-neighbors-from-a-numerical-vector-based-index/214110 "2020-01-08T10:22:45Z")

</div>

Say I indexed something like this: { {'l1':\[1,2,3,4\],'l2':\[5,6,7,7\]} {'l1':\[1,2,6,6\],'l2':\[4,3,2,7\]} ... .. {'l1':\[1,2,3,24\],'l2':\[5,6,37,1\]} } And I have a dictionary as {'l1':\[2,3,4,5\]} and I want to find k values …

---

## [Failed to start Elasticsearch on centos 7](https://discuss.elastic.co/t/failed-to-start-elasticsearch-on-centos-7/214158)

<div class="topic-metadata">

**Author:** [@steven.l](https://discuss.elastic.co/u/steven.l)\
**Replies:** 1\
**Last updated:** [January 8, 2020, 10:19am UTC](https://discuss.elastic.co/t/failed-to-start-elasticsearch-on-centos-7/214158 "2020-01-08T10:19:09Z")

</div>

OS: Centos 7 My installation step of elasticsearch was following the command from the website (Install Elasticsearch with RPM | Elasticsearch Guide \[7.5\] | Elastic): \> wget https://artifacts.elastic.co/downloads/elast…

---

## [The msearch request must be terminated by a newline \[\\n\] error](https://discuss.elastic.co/t/the-msearch-request-must-be-terminated-by-a-newline-n-error/211846)

<div class="topic-metadata">

**Author:** [@aasoft](https://discuss.elastic.co/u/aasoft)\
**Replies:** 5\
**Last updated:** [January 8, 2020, 10:10am UTC](https://discuss.elastic.co/t/the-msearch-request-must-be-terminated-by-a-newline-n-error/211846 "2020-01-08T10:10:56Z")

</div>

I am trying to use the curl command and hit my index. I am using the following command curl -XPOST 'https://myurl/myindex/\_msearch?' -H 'Content-Type: application/x-ndjson' -d'{"preference":"ResultList01"} {"query": {"…

---

## [Embed highlighter](https://discuss.elastic.co/t/embed-highlighter/212566)

<div class="topic-metadata">

**Author:** [@fabio.vianello](https://discuss.elastic.co/u/fabio.vianello)\
**Replies:** 6\
**Last updated:** [January 8, 2020, 10:09am UTC](https://discuss.elastic.co/t/embed-highlighter/212566 "2020-01-08T10:09:53Z")

</div>

Hi everyone, I need help. I have to incorporate the highlighter is this my code on node.jd thanks app.get('/search', function (req, res) { let body = { size: 100, from: 0, query: { bool: { \_id: , must: \[ …

---

## [How to trade on a value in Watcher - Elasticsearch](https://discuss.elastic.co/t/how-to-trade-on-a-value-in-watcher-elasticsearch/212564)

<div class="topic-metadata">

**Author:** [@vbryandc](https://discuss.elastic.co/u/vbryandc)\
**Replies:** 3\
**Last updated:** [January 8, 2020, 10:09am UTC](https://discuss.elastic.co/t/how-to-trade-on-a-value-in-watcher-elasticsearch/212564 "2020-01-08T10:09:09Z")

</div>

Hi, I have the following watcher: { "trigger": { "schedule": { "interval": "1m" } }, "input": { "search": { "request": { "search\_type": "query\_then\_fetch", "indices": \[ …

---

## [\[query\_shard\_exception\]Failed to parse query](https://discuss.elastic.co/t/query-shard-exception-failed-to-parse-query/212648)

<div class="topic-metadata">

**Author:** [@Addepalli\_Venkata\_Ma](https://discuss.elastic.co/u/Addepalli_Venkata_Ma)\
**Replies:** 3\
**Last updated:** [January 8, 2020, 10:06am UTC](https://discuss.elastic.co/t/query-shard-exception-failed-to-parse-query/212648 "2020-01-08T10:06:58Z")

</div>

I was trying to run a search query on the twitter data, i inserted in to elasticsearch. This is the error i am getting in kibana but not on from terminal where i have used curl version of the same query. From curl i am …

---

## [Setup Elasticsearch and Kibana on the same server with TLS/SSL](https://discuss.elastic.co/t/setup-elasticsearch-and-kibana-on-the-same-server-with-tls-ssl/214012)

<div class="topic-metadata">

**Author:** [@HrDahl](https://discuss.elastic.co/u/HrDahl)\
**Replies:** 3\
**Last updated:** [January 8, 2020, 9:57am UTC](https://discuss.elastic.co/t/setup-elasticsearch-and-kibana-on-the-same-server-with-tls-ssl/214012 "2020-01-08T09:57:04Z")

</div>

I have tried for the past week to get ES and Kibana working over https on the same server with proper DNS names. :confused: I am using a wildcard certificate for everything e.g. ES DNS, Kibana DNS and server certificat…

---

## [Unable to perform insert or delete action in elasticsearch](https://discuss.elastic.co/t/unable-to-perform-insert-or-delete-action-in-elasticsearch/214024)

<div class="topic-metadata">

**Author:** [@swati\_dupare](https://discuss.elastic.co/u/swati_dupare)\
**Replies:** 6\
**Last updated:** [January 8, 2020, 9:44am UTC](https://discuss.elastic.co/t/unable-to-perform-insert-or-delete-action-in-elasticsearch/214024 "2020-01-08T09:44:28Z")

</div>

Hi, I am getting below error when I am trying to insert or delete data from elasticsearch : index \[index\_name\] blocked by: \[FORBIDDEN/12/index read-only / allow delete (api) Thanks

---

## [Elasticsearch in K8s cannot restart because of recovery failure (multiple alias write indexes)](https://discuss.elastic.co/t/elasticsearch-in-k8s-cannot-restart-because-of-recovery-failure-multiple-alias-write-indexes/214100)

<div class="topic-metadata">

**Author:** [@MF57](https://discuss.elastic.co/u/MF57)\
**Replies:** 3\
**Last updated:** [January 8, 2020, 9:41am UTC](https://discuss.elastic.co/t/elasticsearch-in-k8s-cannot-restart-because-of-recovery-failure-multiple-alias-write-indexes/214100 "2020-01-08T09:41:26Z")

</div>

Hello, I have an elastic search cluster deployed in the k8s cluster: "version" : { "number" : "6.7.1", "build\_flavor" : "default", "build\_type" : "docker", "build\_hash" : "2f32220", "build\_date" : "2019-04-02T15:59:27.…

---

## [Read-Only On Replica](https://discuss.elastic.co/t/read-only-on-replica/214200)

<div class="topic-metadata">

**Author:** [@cigarl](https://discuss.elastic.co/u/cigarl)\
**Replies:** 0\
**Last updated:** [January 8, 2020, 9:38am UTC](https://discuss.elastic.co/t/read-only-on-replica/214200 "2020-01-08T09:38:35Z")

</div>

If the primary shard and the replica share the same data files, and make the copy read-only. What is the best way to use ？ I found that the engine was initialized based on the index level when the node started. Whether …

---

## [Nested filter in aggregation query](https://discuss.elastic.co/t/nested-filter-in-aggregation-query/214196)

<div class="topic-metadata">

**Author:** [@Ankur\_Agarwal2](https://discuss.elastic.co/u/Ankur_Agarwal2)\
**Replies:** 0\
**Last updated:** [January 8, 2020, 9:24am UTC](https://discuss.elastic.co/t/nested-filter-in-aggregation-query/214196 "2020-01-08T09:24:57Z")

</div>

Hi Team, I have running following aggregation query with nested filter GET /\_search { "aggs": { "NAME": { "nested": { "path": "crm.LeadStatusHistory" }, "aggs": { "agg\_filter": { "filter": { "bool": { "must"…

---

## [Search using "OR" condition on keyword field that contains spaces](https://discuss.elastic.co/t/search-using-or-condition-on-keyword-field-that-contains-spaces/213976)

<div class="topic-metadata">

**Author:** [@dedicatedmanagers](https://discuss.elastic.co/u/dedicatedmanagers)\
**Replies:** 8\
**Last updated:** [January 8, 2020, 9:01am UTC](https://discuss.elastic.co/t/search-using-or-condition-on-keyword-field-that-contains-spaces/213976 "2020-01-08T09:01:03Z")

</div>

My data "keywords" contain spaces. So "X AAA" is one "keyword". And "B AAA" is another keyword. My data will only have one of these in the actual field. So the data field will never look like a combination of the tw…

---

## [Limit on alias indexes](https://discuss.elastic.co/t/limit-on-alias-indexes/214007)

<div class="topic-metadata">

**Author:** [@apiras](https://discuss.elastic.co/u/apiras)\
**Replies:** 2\
**Last updated:** [January 8, 2020, 8:35am UTC](https://discuss.elastic.co/t/limit-on-alias-indexes/214007 "2020-01-08T08:35:57Z")

</div>

Hi all, I found the topic https://discuss.elastic.co/t/is-there-limit-for-alias-indexes/53537 on the same issue of 3 years ago. Is still fine? Any changes in last versions of ES? Thanks in advance

---

## [ES msearch responses 404 when using GET while it reponses 200 when using POST](https://discuss.elastic.co/t/es-msearch-responses-404-when-using-get-while-it-reponses-200-when-using-post/213902)

<div class="topic-metadata">

**Author:** [@Zeng\_Sharp](https://discuss.elastic.co/u/Zeng_Sharp)\
**Replies:** 1\
**Last updated:** [January 8, 2020, 8:25am UTC](https://discuss.elastic.co/t/es-msearch-responses-404-when-using-get-while-it-reponses-200-when-using-post/213902 "2020-01-08T08:25:55Z")

</div>

Could you help explain why the behavior is different between GET and POST? And advise how to make it work when using GET? Thanks in advance. curl --location --request GET 'http://kibana.xxx.xxx.xx:5601/elasticsearch/\_ms…

---

## [UnavailableShardsException on cluster](https://discuss.elastic.co/t/unavailableshardsexception-on-cluster/214186)

<div class="topic-metadata">

**Author:** [@davidclaeys](https://discuss.elastic.co/u/davidclaeys)\
**Replies:** 0\
**Last updated:** [January 8, 2020, 8:23am UTC](https://discuss.elastic.co/t/unavailableshardsexception-on-cluster/214186 "2020-01-08T08:23:04Z")

</div>

I'm having trouble inserting data into my cluster. I've troubleshooted reading the available documentation but it seems like I'm missing something. First of all the ES version I'm using is 5.6. Due to the another softwa…

---

## [How to open elasticsearch health check link with some parameter in browser like "-u" after implementing XPACK](https://discuss.elastic.co/t/how-to-open-elasticsearch-health-check-link-with-some-parameter-in-browser-like-u-after-implementing-xpack/214165)

<div class="topic-metadata">

**Author:** [@krushnakantB](https://discuss.elastic.co/u/krushnakantB)\
**Replies:** 0\
**Last updated:** [January 8, 2020, 7:04am UTC](https://discuss.elastic.co/t/how-to-open-elasticsearch-health-check-link-with-some-parameter-in-browser-like-u-after-implementing-xpack/214165 "2020-01-08T07:04:08Z")

</div>

Hi Friends, I have implemented XPACK. Earlier I am using IP sentry to monitor the health of elasticsearch, so we can give health check link if it is accessible or not. After installation of XPACK I am not able to access…

---

## [Set timeout](https://discuss.elastic.co/t/set-timeout/213551)

<div class="topic-metadata">

**Author:** [@rihad](https://discuss.elastic.co/u/rihad)\
**Replies:** 16\
**Last updated:** [January 8, 2020, 6:42am UTC](https://discuss.elastic.co/t/set-timeout/213551 "2020-01-08T06:42:59Z")

</div>

Hi, how can I set timeout in elasticsearch.yml? https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html#cluster-health-api-query-params I tried these: timeout: 60, query.timeout, Query.timeou…

---

## [Please provide a sample for removing one alias name from the previous quarter index via curator](https://discuss.elastic.co/t/please-provide-a-sample-for-removing-one-alias-name-from-the-previous-quarter-index-via-curator/214156)

<div class="topic-metadata">

**Author:** [@Gokulnath](https://discuss.elastic.co/u/Gokulnath)\
**Replies:** 0\
**Last updated:** [January 8, 2020, 6:10am UTC](https://discuss.elastic.co/t/please-provide-a-sample-for-removing-one-alias-name-from-the-previous-quarter-index-via-curator/214156 "2020-01-08T06:10:40Z")

</div>

In my project we will create index for quarterly basis (i.e 4 indexes per year). I have 2 alias name, one for ingest and another one for search. when a new index is created i want to remove ingest alias alone from previo…

---

## [Snapshot repository shows error in Cerebro tool](https://discuss.elastic.co/t/snapshot-repository-shows-error-in-cerebro-tool/214022)

<div class="topic-metadata">

**Author:** [@Joseph\_Raj](https://discuss.elastic.co/u/Joseph_Raj)\
**Replies:** 3\
**Last updated:** [January 8, 2020, 5:55am UTC](https://discuss.elastic.co/t/snapshot-repository-shows-error-in-cerebro-tool/214022 "2020-01-08T05:55:31Z")

</div>

Unable to create repository using cerebro tool. Please find the attached screenshot for the error. Let us know your feedback on this error & help us to resolve the same. Thanks in advance !!!

---

## [Transport Javascript API 16.x. for ElasticSearch](https://discuss.elastic.co/t/transport-javascript-api-16-x-for-elasticsearch/214149)

<div class="topic-metadata">

**Author:** [@jaytran](https://discuss.elastic.co/u/jaytran)\
**Replies:** 1\
**Last updated:** [January 8, 2020, 5:49am UTC](https://discuss.elastic.co/t/transport-javascript-api-16-x-for-elasticsearch/214149 "2020-01-08T05:49:16Z")

</div>

Hi All, I'm working with Javascript API 16.x. for ElasticSearch, I want to use Transport API but I can not find out it. it is only available for version 6.x 7.x https://www.elastic.co/guide/en/elasticsearch/client/java…

---

## [Can not put index settings](https://discuss.elastic.co/t/can-not-put-index-settings/214147)

<div class="topic-metadata">

**Author:** [@4968d645bd88f4cdfc17](https://discuss.elastic.co/u/4968d645bd88f4cdfc17)\
**Replies:** 1\
**Last updated:** [January 8, 2020, 4:03am UTC](https://discuss.elastic.co/t/can-not-put-index-settings/214147 "2020-01-08T04:03:16Z")

</div>

\[root@xxx ~\]# curl -X PUT "localhost:9200/ols-mgw-201912/\_settings?pretty" -H 'Content-Type: application/json' -d' \> { \> "index.routing.allocation.exclude.\_ip": "10.97.19.104" \> } \> ' { "error" : { "root\_cause" : \[ …

---

## [Date data type null value indexing from csv import](https://discuss.elastic.co/t/date-data-type-null-value-indexing-from-csv-import/212585)

<div class="topic-metadata">

**Author:** [@sadeshdrj](https://discuss.elastic.co/u/sadeshdrj)\
**Replies:** 2\
**Last updated:** [January 8, 2020, 1:32am UTC](https://discuss.elastic.co/t/date-data-type-null-value-indexing-from-csv-import/212585 "2020-01-08T01:32:08Z")

</div>

Hi There, Following, im trying to figure out, is there anyway that we can index null values for "Date" data type ? or is there anyway i can index values of NULL values without skipping the data row of CSV file, in thi…

---

## [Nested fields in the index (template)](https://discuss.elastic.co/t/nested-fields-in-the-index-template/214137)

<div class="topic-metadata">

**Author:** [@Rysiu](https://discuss.elastic.co/u/Rysiu)\
**Replies:** 0\
**Last updated:** [January 7, 2020, 10:02pm UTC](https://discuss.elastic.co/t/nested-fields-in-the-index-template/214137 "2020-01-07T22:02:23Z")

</div>

Hello, In my case, I have an index template containing a nested field. Let it be for example: PUT \_template/template\_v1 { "index\_patterns": \["routes.ipv4.data.\*"\], "settings" : { "number\_of\_shards" : 10 }, "ma…

---

## [Strange performance of terms aggregation on nested documents](https://discuss.elastic.co/t/strange-performance-of-terms-aggregation-on-nested-documents/214136)

<div class="topic-metadata">

**Author:** [@ghyun](https://discuss.elastic.co/u/ghyun)\
**Replies:** 0\
**Last updated:** [January 7, 2020, 9:31pm UTC](https://discuss.elastic.co/t/strange-performance-of-terms-aggregation-on-nested-documents/214136 "2020-01-07T21:31:57Z")

</div>

I'm doing a terms aggregation over a property on nested documents that match some filter. I'm seeing some weird behavior where the aggregation seems to take a similar amount of time for very different sizes of document s…

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

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