# Elasticsearch

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

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

**Page:** 936

---

## [Running benchmark-only stalls](https://discuss.elastic.co/t/running-benchmark-only-stalls/230681)

<div class="topic-metadata">

**Author:** [@rokcarl](https://discuss.elastic.co/u/rokcarl)\
**Replies:** 4\
**Last updated:** [May 3, 2020, 5:44pm UTC](https://discuss.elastic.co/t/running-benchmark-only-stalls/230681 "2020-05-03T17:44:20Z")

</div>

I'm running esrally with the benchmark-only pipeline, but it's stalling at Watch your steps!, nothing happens. esrally --pipeline=benchmark-only --target-hosts=https://\[server\].com --track=http\_logs \_\_\_\_ \_\_\_…

---

## [Newbie question: Filter/Matching for different criterias with kind of matching score?](https://discuss.elastic.co/t/newbie-question-filter-matching-for-different-criterias-with-kind-of-matching-score/230876)

<div class="topic-metadata">

**Author:** [@iparker](https://discuss.elastic.co/u/iparker)\
**Replies:** 0\
**Last updated:** [May 3, 2020, 1:36pm UTC](https://discuss.elastic.co/t/newbie-question-filter-matching-for-different-criterias-with-kind-of-matching-score/230876 "2020-05-03T13:36:49Z")

</div>

Hello, I'm completely new to elasticsearch so sorry for this newbie question. I read about elasticsearch score calculation for full text search and also about the filter in a query (in a boolean way: 1 if the document …

---

## [Elastic Search Java API implementaion to get No of Hits(First time working on Elastic Search)](https://discuss.elastic.co/t/elastic-search-java-api-implementaion-to-get-no-of-hits-first-time-working-on-elastic-search/230794)

<div class="topic-metadata">

**Author:** [@abhir83](https://discuss.elastic.co/u/abhir83)\
**Replies:** 7\
**Last updated:** [May 3, 2020, 1:01pm UTC](https://discuss.elastic.co/t/elastic-search-java-api-implementaion-to-get-no-of-hits-first-time-working-on-elastic-search/230794 "2020-05-03T13:01:09Z")

</div>

Hi I am a Software tester trying to get the Number of Hits through Elastic Search for the first time. I have no idea about Ellastic Search.Please tell me if my approach is correct. Following are the dependencies in pom…

---

## [Kafka Consumer ElasticSearch?](https://discuss.elastic.co/t/kafka-consumer-elasticsearch/230765)

<div class="topic-metadata">

**Author:** [@rishabh\_jain](https://discuss.elastic.co/u/rishabh_jain)\
**Replies:** 6\
**Last updated:** [May 3, 2020, 12:33pm UTC](https://discuss.elastic.co/t/kafka-consumer-elasticsearch/230765 "2020-05-03T12:33:06Z")

</div>

is there any way by which the data sent into kafka stream can be dumped into elasticsearch?

---

## [Simple aggregation on a field for more than one value](https://discuss.elastic.co/t/simple-aggregation-on-a-field-for-more-than-one-value/230861)

<div class="topic-metadata">

**Author:** [@Daud\_Ahmed](https://discuss.elastic.co/u/Daud_Ahmed)\
**Replies:** 0\
**Last updated:** [May 3, 2020, 11:02am UTC](https://discuss.elastic.co/t/simple-aggregation-on-a-field-for-more-than-one-value/230861 "2020-05-03T11:02:36Z")

</div>

Basically what i want is instead of creating doc\_count for every unique value for a field.... i just want to have two keys "passed" and "failed". failed key doc\_count should be equal to sum of doc\_count containing valu…

---

## [Ingest mongodb data into elastic search](https://discuss.elastic.co/t/ingest-mongodb-data-into-elastic-search/230860)

<div class="topic-metadata">

**Author:** [@santosh1607kumar](https://discuss.elastic.co/u/santosh1607kumar)\
**Replies:** 0\
**Last updated:** [May 3, 2020, 10:41am UTC](https://discuss.elastic.co/t/ingest-mongodb-data-into-elastic-search/230860 "2020-05-03T10:41:26Z")

</div>

Hi all, I was wondering if i can ingest mongodb data into elasticsearch from one aws ec2 ubuntu instance where I have my mongodb into another ec2 ubuntu instance where I have my elasticsearch and kibana already setup wi…

---

## [Error OPERATION\_NOT\_ALLOWED](https://discuss.elastic.co/t/error-operation-not-allowed/230644)

<div class="topic-metadata">

**Author:** [@rrs](https://discuss.elastic.co/u/rrs)\
**Replies:** 2\
**Last updated:** [May 3, 2020, 10:17am UTC](https://discuss.elastic.co/t/error-operation-not-allowed/230644 "2020-05-03T10:17:58Z")

</div>

We have a ELK-5.6.3 cluster with readonlyrest pro plugin and running fine. For some reasons we need to migrate to 7.6.2 as separate cluster. The new cluster also enabled with readonlyrest free and xpack disabled. When do…

---

## [Excluding documents from a search](https://discuss.elastic.co/t/excluding-documents-from-a-search/230843)

<div class="topic-metadata">

**Author:** [@apezzatto](https://discuss.elastic.co/u/apezzatto)\
**Replies:** 1\
**Last updated:** [May 3, 2020, 8:06am UTC](https://discuss.elastic.co/t/excluding-documents-from-a-search/230843 "2020-05-03T08:06:16Z")

</div>

Hello all, I'm a brand new developer using elastic search, and I'm struggling to accomplish what seems to be a simple task: filtering documents that I don't want from my search result result. My index consists, among o…

---

## [Cannot access to localhost but node has started](https://discuss.elastic.co/t/cannot-access-to-localhost-but-node-has-started/230492)

<div class="topic-metadata">

**Author:** [@yummycake](https://discuss.elastic.co/u/yummycake)\
**Replies:** 9\
**Last updated:** [May 3, 2020, 6:16am UTC](https://discuss.elastic.co/t/cannot-access-to-localhost-but-node-has-started/230492 "2020-05-03T06:16:39Z")

</div>

Cannot access to localhost to check Elasticsearch status Have already tried switching off the firewall. Still the same result. Currently running in docker in WS 2016 server. Elasticsearch 7.6.2. Here is the log \[2020-…

---

## [Elasticsearch real time write indexing performance](https://discuss.elastic.co/t/elasticsearch-real-time-write-indexing-performance/230758)

<div class="topic-metadata">

**Author:** [@Vinod\_Kandula](https://discuss.elastic.co/u/Vinod_Kandula)\
**Replies:** 9\
**Last updated:** [May 3, 2020, 5:19am UTC](https://discuss.elastic.co/t/elasticsearch-real-time-write-indexing-performance/230758 "2020-05-03T05:19:15Z")

</div>

Hi, pls help me with ES write performance for real time indexing and how soon the document is available for search. To establish this in my jmeter performance script, after every document index, a fixed delay of 300ms o…

---

## [RequestError: RequestError(400, 'parsing\_exception', '\[terms\] query does not support \[country\]')](https://discuss.elastic.co/t/requesterror-requesterror-400-parsing-exception-terms-query-does-not-support-country/230841)

<div class="topic-metadata">

**Author:** [@TanmoyP](https://discuss.elastic.co/u/TanmoyP)\
**Replies:** 1\
**Last updated:** [May 3, 2020, 4:35am UTC](https://discuss.elastic.co/t/requesterror-requesterror-400-parsing-exception-terms-query-does-not-support-country/230841 "2020-05-03T04:35:58Z")

</div>

I am new to Elasticsearch and getting error while running this: for brand in extract\['brand'\].values: s\_names = Search() \\ .query('multi\_match', type = "cross\_fields", …

---

## [Groovy Scripting optional paramters](https://discuss.elastic.co/t/groovy-scripting-optional-paramters/230835)

<div class="topic-metadata">

**Author:** [@teebu](https://discuss.elastic.co/u/teebu)\
**Replies:** 0\
**Last updated:** [May 3, 2020, 12:05am UTC](https://discuss.elastic.co/t/groovy-scripting-optional-paramters/230835 "2020-05-03T00:05:19Z")

</div>

I'm trying to figure out how to have optional params with default value. My script is simple: { "script": "doc\[field\].empty ? 0 : (201 - doc\[field\]) \* boost" } I want the boost to default to 1 if its omitted in the …

---

## [Field count limit](https://discuss.elastic.co/t/field-count-limit/230831)

<div class="topic-metadata">

**Author:** [@Antony\_Ukken](https://discuss.elastic.co/u/Antony_Ukken)\
**Replies:** 3\
**Last updated:** [May 2, 2020, 10:53pm UTC](https://discuss.elastic.co/t/field-count-limit/230831 "2020-05-02T22:53:42Z")

</div>

There is limit on the number of fields that a index can have. i guess by default the limit is around 1000. In my case, the fields are generated dynamically and there could be a lot of fields actually. Is there any way t…

---

## [I have added SSL certificate ti single node cluster and I'm ended up with this error?](https://discuss.elastic.co/t/i-have-added-ssl-certificate-ti-single-node-cluster-and-im-ended-up-with-this-error/230823)

<div class="topic-metadata">

**Author:** [@kartheek91](https://discuss.elastic.co/u/kartheek91)\
**Replies:** 1\
**Last updated:** [May 2, 2020, 7:35pm UTC](https://discuss.elastic.co/t/i-have-added-ssl-certificate-ti-single-node-cluster-and-im-ended-up-with-this-error/230823 "2020-05-02T19:35:06Z")

</div>

I have successfully installed SSL certificate and restarted the elasticsearch instance. Then while I'm running this query curl -k http://localhost:9200?pretty -u elastic I'm getting this error curl: (35) error:…

---

## [How to calculate "net expansion factor"](https://discuss.elastic.co/t/how-to-calculate-net-expansion-factor/230824)

<div class="topic-metadata">

**Author:** [@Burga](https://discuss.elastic.co/u/Burga)\
**Replies:** 2\
**Last updated:** [May 2, 2020, 6:44pm UTC](https://discuss.elastic.co/t/how-to-calculate-net-expansion-factor/230824 "2020-05-02T18:44:51Z")

</div>

Hi , I'm trying to figure out how to calculate "net expansion factor" , from reading a few notes I understand that net expansion factor = JSON Factor \* Indexing Factor \* Compression Factor but how can I calculate JS…

---

## [Java API substring search query](https://discuss.elastic.co/t/java-api-substring-search-query/230808)

<div class="topic-metadata">

**Author:** [@JavaDeveloper](https://discuss.elastic.co/u/JavaDeveloper)\
**Replies:** 2\
**Last updated:** [May 2, 2020, 4:36pm UTC](https://discuss.elastic.co/t/java-api-substring-search-query/230808 "2020-05-02T16:36:42Z")

</div>

Hi everyone. Elasticsearch question about JAVA API: I have a string (36 characters) where only last 8 characters are different (other chars are prefix) and therefore I want to do search query over these last 8 characte…

---

## [Elastic painless script: Iteration on all documents](https://discuss.elastic.co/t/elastic-painless-script-iteration-on-all-documents/230686)

<div class="topic-metadata">

**Author:** [@jsonpaul](https://discuss.elastic.co/u/jsonpaul)\
**Replies:** 1\
**Last updated:** [May 2, 2020, 1:59pm UTC](https://discuss.elastic.co/t/elastic-painless-script-iteration-on-all-documents/230686 "2020-05-02T13:59:49Z")

</div>

Hello everyone, In elastic script params\[\_source \] or doc contexts returns only a single document and it allows us to iterate on fields but I need to get variables from all other documents to do my calculation. How can …

---

## [How to search for maximum hitting IPs if those IPs are showing in the error.message field](https://discuss.elastic.co/t/how-to-search-for-maximum-hitting-ips-if-those-ips-are-showing-in-the-error-message-field/230792)

<div class="topic-metadata">

**Author:** [@Dheeraj\_Bhargav](https://discuss.elastic.co/u/Dheeraj_Bhargav)\
**Replies:** 3\
**Last updated:** [May 2, 2020, 1:00pm UTC](https://discuss.elastic.co/t/how-to-search-for-maximum-hitting-ips-if-those-ips-are-showing-in-the-error-message-field/230792 "2020-05-02T13:00:17Z")

</div>

I am getting multiple hits in my IIS logs and want a query to get which IP is hitting multiple times. and those ips are showing in the error.message field as a string.

---

## [Not able to index records which contain missing fields ElasticSearch 7.4](https://discuss.elastic.co/t/not-able-to-index-records-which-contain-missing-fields-elasticsearch-7-4/230782)

<div class="topic-metadata">

**Author:** [@yoyomonkey](https://discuss.elastic.co/u/yoyomonkey)\
**Replies:** 1\
**Last updated:** [May 2, 2020, 10:54am UTC](https://discuss.elastic.co/t/not-able-to-index-records-which-contain-missing-fields-elasticsearch-7-4/230782 "2020-05-02T10:54:02Z")

</div>

Hello all, Can someone point me in the right direction of any documents or links that may be able to help me. I have am using kinesis to ingest just 2 simple events 2020-01-09 15:35:51,334 tid:LE7WZpV000NCG4NeSUVwBvW6…

---

## [Elasticsearch timeout for search query](https://discuss.elastic.co/t/elasticsearch-timeout-for-search-query/230067)

<div class="topic-metadata">

**Author:** [@Rakesh\_B](https://discuss.elastic.co/u/Rakesh_B)\
**Replies:** 6\
**Last updated:** [May 2, 2020, 7:23am UTC](https://discuss.elastic.co/t/elasticsearch-timeout-for-search-query/230067 "2020-05-02T07:23:48Z")

</div>

Hi, Elasticsearch version 7.6.1 We have a total of 55 indices with 228 shards and a disk space of 4.8 TB Our indexing rate ranges from (3000-8000 docs per second) with a total of 250 million docs coming per day. We h…

---

## [Invalid aggregation order path](https://discuss.elastic.co/t/invalid-aggregation-order-path/228472)

<div class="topic-metadata">

**Author:** [@Damiano](https://discuss.elastic.co/u/Damiano)\
**Replies:** 2\
**Last updated:** [May 2, 2020, 1:21am UTC](https://discuss.elastic.co/t/invalid-aggregation-order-path/228472 "2020-05-02T01:21:35Z")

</div>

Hello everybody! I am using ElasticSearch 7.6 with a test index that has the following mapping: { "test" : { "mappings" : { "properties" : { "amount" : { "type" : "long" }, …

---

## [Can I blow out elasticsearch log directory "/var/log/elasticsearch" or is that a no no?](https://discuss.elastic.co/t/can-i-blow-out-elasticsearch-log-directory-var-log-elasticsearch-or-is-that-a-no-no/230780)

<div class="topic-metadata">

**Author:** [@syost](https://discuss.elastic.co/u/syost)\
**Replies:** 1\
**Last updated:** [May 2, 2020, 12:59am UTC](https://discuss.elastic.co/t/can-i-blow-out-elasticsearch-log-directory-var-log-elasticsearch-or-is-that-a-no-no/230780 "2020-05-02T00:59:40Z")

</div>

I would like to monitor elasticsearch logs using filebeat and I see in my "elasticsearch.yml" these are stored... path.logs: /var/log/elasticsearch There's a bunch of stuff in here and I would just like to delete every…

---

## [I am trying push data to elasticsearch using aws lambda function written in node js and getting this error](https://discuss.elastic.co/t/i-am-trying-push-data-to-elasticsearch-using-aws-lambda-function-written-in-node-js-and-getting-this-error/230743)

<div class="topic-metadata">

**Author:** [@rishabh\_jain](https://discuss.elastic.co/u/rishabh_jain)\
**Replies:** 3\
**Last updated:** [May 1, 2020, 8:42pm UTC](https://discuss.elastic.co/t/i-am-trying-push-data-to-elasticsearch-using-aws-lambda-function-written-in-node-js-and-getting-this-error/230743 "2020-05-01T20:42:57Z")

</div>

Elasticsearch ERROR: 2020-05-01T13:31:11Z Error: Request error, retrying POST https://xxx.gcp.cloud.es.io:9243/a\_comment/comment/\_search =\> socket hang up at Log.error (/app/node\_modules/elasticsearch/src/lib/log.js:2…

---

## [Elastic Search Version Based Update API](https://discuss.elastic.co/t/elastic-search-version-based-update-api/230762)

<div class="topic-metadata">

**Author:** [@rishabh\_jain](https://discuss.elastic.co/u/rishabh_jain)\
**Replies:** 0\
**Last updated:** [May 1, 2020, 8:17pm UTC](https://discuss.elastic.co/t/elastic-search-version-based-update-api/230762 "2020-05-01T20:17:15Z")

</div>

is there any way in which i can do upsert on the basis of version i.e if document doesnt exists then it would create the document and if exists then it would look for version if new version is greater than existing ver…

---

## [Group by date aggregation on day by day?](https://discuss.elastic.co/t/group-by-date-aggregation-on-day-by-day/230703)

<div class="topic-metadata">

**Author:** [@Ramesh\_Kumar](https://discuss.elastic.co/u/Ramesh_Kumar)\
**Replies:** 6\
**Last updated:** [May 1, 2020, 6:57pm UTC](https://discuss.elastic.co/t/group-by-date-aggregation-on-day-by-day/230703 "2020-05-01T18:57:19Z")

</div>

{ "size": 0, "aggs" : { "group\_by\_day" : { "date\_histogram" : { "field" : "date\_inserted", "interval": "day" } } } }

---

## [How to use bulk api for partial updates of documents that may not exist?](https://discuss.elastic.co/t/how-to-use-bulk-api-for-partial-updates-of-documents-that-may-not-exist/230722)

<div class="topic-metadata">

**Author:** [@rmavilia\_w](https://discuss.elastic.co/u/rmavilia_w)\
**Replies:** 1\
**Last updated:** [May 1, 2020, 3:33pm UTC](https://discuss.elastic.co/t/how-to-use-bulk-api-for-partial-updates-of-documents-that-may-not-exist/230722 "2020-05-01T15:33:06Z")

</div>

I am trying to use the \_bulk endpoint with update requests but I have a few different data pipelines that are going to be putting together the pieces of my documents. I have realized that the reason my updates aren't wor…

---

## [Getting the Object from searchResponse](https://discuss.elastic.co/t/getting-the-object-from-searchresponse/230727)

<div class="topic-metadata">

**Author:** [@Siddharth1010](https://discuss.elastic.co/u/Siddharth1010)\
**Replies:** 0\
**Last updated:** [May 1, 2020, 3:16pm UTC](https://discuss.elastic.co/t/getting-the-object-from-searchresponse/230727 "2020-05-01T15:16:51Z")

</div>

I am trying to retrieve the Object from my searchresponse which I obtained through searchResponse = restHighLevelClient.search(searchRequest); I am using the following method SearchHit\[\] result = searchResponse.g…

---

## [Apply More Like This to subset data](https://discuss.elastic.co/t/apply-more-like-this-to-subset-data/230716)

<div class="topic-metadata">

**Author:** [@lschnei](https://discuss.elastic.co/u/lschnei)\
**Replies:** 0\
**Last updated:** [May 1, 2020, 2:16pm UTC](https://discuss.elastic.co/t/apply-more-like-this-to-subset-data/230716 "2020-05-01T14:16:31Z")

</div>

Hi there, I'm trying to apply a more like this query to a subset of my data filtered for dates. I'd like the final score to only be the score of more like this on the subset. How should i proceed ? I have been trying …

---

## [Elastic unable to start](https://discuss.elastic.co/t/elastic-unable-to-start/230677)

<div class="topic-metadata">

**Author:** [@Alexy\_Kouakou](https://discuss.elastic.co/u/Alexy_Kouakou)\
**Replies:** 1\
**Last updated:** [May 1, 2020, 2:07pm UTC](https://discuss.elastic.co/t/elastic-unable-to-start/230677 "2020-05-01T14:07:39Z")

</div>

Hi, Please Help me My elastic refuses to start. This is the systemctl status elasticsearch.service log ● elasticsearch.service - Elasticsearch Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled;…

---

## [String to nested type, possible?](https://discuss.elastic.co/t/string-to-nested-type-possible/230712)

<div class="topic-metadata">

**Author:** [@karimelc](https://discuss.elastic.co/u/karimelc)\
**Replies:** 0\
**Last updated:** [May 1, 2020, 1:08pm UTC](https://discuss.elastic.co/t/string-to-nested-type-possible/230712 "2020-05-01T13:08:19Z")

</div>

Hi, I have an existing index where the field items looks like: "items": "{"productA":{"qty":3},"productB":{"qty":5},"productC":{"qty":9}}" The field items is mapped as type text. The field items can contain any number…

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

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