# Elasticsearch

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

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

**Page:** 1908

---

## [How to boost a nested obj in multi\_match fields list](https://discuss.elastic.co/t/how-to-boost-a-nested-obj-in-multi-match-fields-list/105635)

<div class="topic-metadata">

**Author:** [@Buntu\_Dev](https://discuss.elastic.co/u/Buntu_Dev)\
**Replies:** 0\
**Last updated:** [October 28, 2017, 7:30am UTC](https://discuss.elastic.co/t/how-to-boost-a-nested-obj-in-multi-match-fields-list/105635 "2017-10-28T07:30:11Z")

</div>

I got a nested field in the doc in this form and want to write a query applying the boosting on this field: Previously the nested field structure was something like this: ... "my\_nested\_obj": { "project-type": \[ …

---

## [Completion Suggestion Java API for ElasticSearch 5.5.1](https://discuss.elastic.co/t/completion-suggestion-java-api-for-elasticsearch-5-5-1/105216)

<div class="topic-metadata">

**Author:** [@xiaobingy](https://discuss.elastic.co/u/xiaobingy)\
**Replies:** 2\
**Last updated:** [October 28, 2017, 4:12am UTC](https://discuss.elastic.co/t/completion-suggestion-java-api-for-elasticsearch-5-5-1/105216 "2017-10-28T04:12:01Z")

</div>

I want to refer the following example to code the suggestions function with java for elasticsearch 5.5.1, but I could not find the prepareSearch , addSuggestion methods like the example. Could you help me to solve the…

---

## [Whitespace analyzer issue](https://discuss.elastic.co/t/whitespace-analyzer-issue/104768)

<div class="topic-metadata">

**Author:** [@ESlearner](https://discuss.elastic.co/u/ESlearner)\
**Replies:** 2\
**Last updated:** [October 28, 2017, 3:03am UTC](https://discuss.elastic.co/t/whitespace-analyzer-issue/104768 "2017-10-28T03:03:44Z")

</div>

I would like to get help on using the whitespace analyzer. Here is the code snippet I am using .... curl -XPUT 'http://localhost:9200/myindex/' -d ' { "settings": { "number\_of\_shards": 1, "number\_of\_replicas": 0 }…

---

## [Change ElasticSearch installation for Windows Service](https://discuss.elastic.co/t/change-elasticsearch-installation-for-windows-service/105602)

<div class="topic-metadata">

**Author:** [@ra.girard](https://discuss.elastic.co/u/ra.girard)\
**Replies:** 4\
**Last updated:** [October 28, 2017, 2:31am UTC](https://discuss.elastic.co/t/change-elasticsearch-installation-for-windows-service/105602 "2017-10-28T02:31:52Z")

</div>

Hello, I don't have the file name service.bat to put Elastic Search 5.6.2 on window service. Do I must uninstall it and install it again ? thanks

---

## [Can restore process go through preprocessors?](https://discuss.elastic.co/t/can-restore-process-go-through-preprocessors/105605)

<div class="topic-metadata">

**Author:** [@webattitude](https://discuss.elastic.co/u/webattitude)\
**Replies:** 4\
**Last updated:** [October 28, 2017, 12:50am UTC](https://discuss.elastic.co/t/can-restore-process-go-through-preprocessors/105605 "2017-10-28T00:50:40Z")

</div>

Hi, here is my use case : I'd like to let a date preprocessor rename indices while they are restored, based on a timestamp field in documents.

---

## [Ways to remove disks from nodes](https://discuss.elastic.co/t/ways-to-remove-disks-from-nodes/105580)

<div class="topic-metadata">

**Author:** [@megadevx](https://discuss.elastic.co/u/megadevx)\
**Replies:** 1\
**Last updated:** [October 27, 2017, 11:40pm UTC](https://discuss.elastic.co/t/ways-to-remove-disks-from-nodes/105580 "2017-10-27T23:40:49Z")

</div>

Does any one have any ways to remove disks from nodes that would limit down time of Elasticsearch? I would like to know what the best method is.

---

## [Plugin Development: access command line arguments](https://discuss.elastic.co/t/plugin-development-access-command-line-arguments/105607)

<div class="topic-metadata">

**Author:** [@Simone\_Scarduzio](https://discuss.elastic.co/u/Simone_Scarduzio)\
**Replies:** 3\
**Last updated:** [October 27, 2017, 11:10pm UTC](https://discuss.elastic.co/t/plugin-development-access-command-line-arguments/105607 "2017-10-27T23:10:58Z")

</div>

Hello, From inside a plugin, I need to get a grip of what's the absolute path of elasticsearch.yml. motivation: I need my plugin's settings file to sit side-by-side in the config dir beside elasticsearch.yml I can …

---

## [Question about securing elasticsearch production setup](https://discuss.elastic.co/t/question-about-securing-elasticsearch-production-setup/105505)

<div class="topic-metadata">

**Author:** [@prachiwadekar](https://discuss.elastic.co/u/prachiwadekar)\
**Replies:** 3\
**Last updated:** [October 27, 2017, 9:30pm UTC](https://discuss.elastic.co/t/question-about-securing-elasticsearch-production-setup/105505 "2017-10-27T21:30:23Z")

</div>

Hi, I have the below elasticsearch setup: 3 master eligible nodes (with node.master = true) 3 data nodes with node.group=indexA (indexA has "index.routing.allocation.include.group": indexA ) 3 data nodes with node.gro…

---

## [API call in data grid aggregation](https://discuss.elastic.co/t/api-call-in-data-grid-aggregation/105617)

<div class="topic-metadata">

**Author:** [@prabhu\_pandurangan](https://discuss.elastic.co/u/prabhu_pandurangan)\
**Replies:** 1\
**Last updated:** [October 27, 2017, 9:09pm UTC](https://discuss.elastic.co/t/api-call-in-data-grid-aggregation/105617 "2017-10-27T21:09:10Z")

</div>

Hi Team, I want to query elasticsearch & make a async api call to external API and show the grid based on the value from the api. for eg: query from ES returns: \[ {id: 1, department: IT, name: xxx, subject: ENG, sco…

---

## [Logstash error while processing ingest node pipeline](https://discuss.elastic.co/t/logstash-error-while-processing-ingest-node-pipeline/105606)

<div class="topic-metadata">

**Author:** [@Pratiksha\_Tewary](https://discuss.elastic.co/u/Pratiksha_Tewary)\
**Replies:** 0\
**Last updated:** [October 27, 2017, 7:28pm UTC](https://discuss.elastic.co/t/logstash-error-while-processing-ingest-node-pipeline/105606 "2017-10-27T19:28:17Z")

</div>

Hi, I am trying to implement a pipeline in logstash which takes data from a source, does a small field extraction using grok filter (divides the event into field 1 and rest). My output segment in the logstash config is …

---

## [Gsub processor to replace null values](https://discuss.elastic.co/t/gsub-processor-to-replace-null-values/105584)

<div class="topic-metadata">

**Author:** [@Pratiksha\_Tewary](https://discuss.elastic.co/u/Pratiksha_Tewary)\
**Replies:** 2\
**Last updated:** [October 27, 2017, 7:04pm UTC](https://discuss.elastic.co/t/gsub-processor-to-replace-null-values/105584 "2017-10-27T19:04:15Z")

</div>

Hi, I was wondering if there was a way to substitute null values with other string values using gsub processor in ingest node pipelines. Thanks.

---

## [Problem with Ingest Attachment Processor Plugin](https://discuss.elastic.co/t/problem-with-ingest-attachment-processor-plugin/105573)

<div class="topic-metadata">

**Author:** [@tomky](https://discuss.elastic.co/u/tomky)\
**Replies:** 7\
**Last updated:** [October 27, 2017, 6:00pm UTC](https://discuss.elastic.co/t/problem-with-ingest-attachment-processor-plugin/105573 "2017-10-27T18:00:13Z")

</div>

Hi! I am new to this plugin and need your help. This is what I do: Create index: PUT localhost:9200/myindex And mappings: PUT localhost:9200/myindex/mytype/\_mapping { "messages": { "properties": { "subjec…

---

## [Upgraded from 2.4.6 to 5.3.2 - now fails to form the cluster](https://discuss.elastic.co/t/upgraded-from-2-4-6-to-5-3-2-now-fails-to-form-the-cluster/105482)

<div class="topic-metadata">

**Author:** [@stefws](https://discuss.elastic.co/u/stefws)\
**Replies:** 2\
**Last updated:** [October 27, 2017, 5:20pm UTC](https://discuss.elastic.co/t/upgraded-from-2-4-6-to-5-3-2-now-fails-to-form-the-cluster/105482 "2017-10-27T17:20:20Z")

</div>

Did a cluster shutdown (all nodes) and then upgraded node by node from 2.4.6 to 5.3.2 and started cluster again node by node, but they all just continually complains like this: \[2017-10-26T23:21:48,072\]\[WARN \]\[o.e.d.z.…

---

## [Sorting on missing value with default fallback](https://discuss.elastic.co/t/sorting-on-missing-value-with-default-fallback/105021)

<div class="topic-metadata">

**Author:** [@supernovae](https://discuss.elastic.co/u/supernovae)\
**Replies:** 1\
**Last updated:** [October 27, 2017, 5:14pm UTC](https://discuss.elastic.co/t/sorting-on-missing-value-with-default-fallback/105021 "2017-10-27T17:14:08Z")

</div>

Hi, is there a way in elasticsearch to "fallback" on a default field value when sorting on a missing field? For instance, let assume I have a field A and a field B in my mapping, which are mutually exclusive so that eac…

---

## [Trouble with query. Tough calculation](https://discuss.elastic.co/t/trouble-with-query-tough-calculation/105309)

<div class="topic-metadata">

**Author:** [@MatthewDiamant](https://discuss.elastic.co/u/MatthewDiamant)\
**Replies:** 1\
**Last updated:** [October 27, 2017, 5:03pm UTC](https://discuss.elastic.co/t/trouble-with-query-tough-calculation/105309 "2017-10-27T17:03:24Z")

</div>

This is my current query { query: { function\_score: { functions: \[ { filter: { match: { foo: "top" } }, weight: 2.0 }, { filter: { match: { foo: "mid" } }, weight: 1.0 }, { field\_valu…

---

## [Storage problem with ngram filters](https://discuss.elastic.co/t/storage-problem-with-ngram-filters/105506)

<div class="topic-metadata">

**Author:** [@sidra\_89](https://discuss.elastic.co/u/sidra_89)\
**Replies:** 7\
**Last updated:** [October 27, 2017, 4:48pm UTC](https://discuss.elastic.co/t/storage-problem-with-ngram-filters/105506 "2017-10-27T16:48:16Z")

</div>

Hi, i need to search all sorts of word combinations and sub string of words through my search engine .. to achieve this i am using ngram filters and it is working perfectly okay but the main concern here is the storage…

---

## [Elastic Search: How to set constant score for only one of the queries](https://discuss.elastic.co/t/elastic-search-how-to-set-constant-score-for-only-one-of-the-queries/105310)

<div class="topic-metadata">

**Author:** [@Renz\_Rollon](https://discuss.elastic.co/u/Renz_Rollon)\
**Replies:** 1\
**Last updated:** [October 27, 2017, 4:45pm UTC](https://discuss.elastic.co/t/elastic-search-how-to-set-constant-score-for-only-one-of-the-queries/105310 "2017-10-27T16:45:24Z")

</div>

Using ElasticSearch 2.3, I have a query like: { "query" : { "bool" : { "should" : \[{ "query\_string" : { "query" : "fullName:("guy")" } }, { "query\_string" : { "query" : "nickName:("guy")" } }, { "term" : …

---

## [Pattern\_filter for removing dots from a number](https://discuss.elastic.co/t/pattern-filter-for-removing-dots-from-a-number/105575)

<div class="topic-metadata">

**Author:** [@guilherme\_maranhao](https://discuss.elastic.co/u/guilherme_maranhao)\
**Replies:** 2\
**Last updated:** [October 27, 2017, 4:43pm UTC](https://discuss.elastic.co/t/pattern-filter-for-removing-dots-from-a-number/105575 "2017-10-27T16:43:34Z")

</div>

Hi everyone, I am using elasticsearch version 5.5.2 . I using GET /\_analyze API to test a pattern\_replace filter. I just need to remove all dots from a number. What I am trying to do is: GET /\_analyze { "char\_fi…

---

## [Sum aggregation on distinct values of field](https://discuss.elastic.co/t/sum-aggregation-on-distinct-values-of-field/105088)

<div class="topic-metadata">

**Author:** [@sharongur](https://discuss.elastic.co/u/sharongur)\
**Replies:** 1\
**Last updated:** [October 27, 2017, 4:41pm UTC](https://discuss.elastic.co/t/sum-aggregation-on-distinct-values-of-field/105088 "2017-10-27T16:41:11Z")

</div>

Hi, I want to make a query that returns my wanted documents. from those documents i need to sum aggregate field1 on all the distinct values of field2 small example: i have index that has 500 documents with fiel…

---

## [Content search encrypted data stored in MongoDB](https://discuss.elastic.co/t/content-search-encrypted-data-stored-in-mongodb/105574)

<div class="topic-metadata">

**Author:** [@Brutusmax\_max](https://discuss.elastic.co/u/Brutusmax_max)\
**Replies:** 1\
**Last updated:** [October 27, 2017, 3:42pm UTC](https://discuss.elastic.co/t/content-search-encrypted-data-stored-in-mongodb/105574 "2017-10-27T15:42:41Z")

</div>

Hello! Situation: We have a website that stores different documents (PDF, docx, txt, ppt, csv, ...) in our MongoDB instance.We crypt this docuements. Now we want integrate a content search in our website. So we can im…

---

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

<div class="topic-metadata">

**Author:** [@SJLG](https://discuss.elastic.co/u/SJLG)\
**Replies:** 1\
**Last updated:** [October 27, 2017, 3:30pm UTC](https://discuss.elastic.co/t/invalid-term-order-aggregation-path/104536 "2017-10-27T15:30:14Z")

</div>

Hi In our software we use the following terms aggregation to group the records by the field sGroup. Each record has a timestamp lTsRequest, which we use to retrieve the most recent / latest values of some other field fo…

---

## [Enable Debug Logging on MetaDataCreateIndexService](https://discuss.elastic.co/t/enable-debug-logging-on-metadatacreateindexservice/105390)

<div class="topic-metadata">

**Author:** [@jmukhtar](https://discuss.elastic.co/u/jmukhtar)\
**Replies:** 1\
**Last updated:** [October 27, 2017, 3:18pm UTC](https://discuss.elastic.co/t/enable-debug-logging-on-metadatacreateindexservice/105390 "2017-10-27T15:18:49Z")

</div>

Is there a way to enable debug logging on MetaDataCreateIndexService component? I have set the template to not to use replica shards, but when the index is created it's created with a replica shard and it takes down clu…

---

## [Filters based on business logic after usual search query](https://discuss.elastic.co/t/filters-based-on-business-logic-after-usual-search-query/105380)

<div class="topic-metadata">

**Author:** [@abhishekash](https://discuss.elastic.co/u/abhishekash)\
**Replies:** 1\
**Last updated:** [October 27, 2017, 3:16pm UTC](https://discuss.elastic.co/t/filters-based-on-business-logic-after-usual-search-query/105380 "2017-10-27T15:16:42Z")

</div>

As part of our development , we have to apply some business rules like whether user has viewing rights to the search string or not. The elastic query we form applies the query criteria given by the user and search elast…

---

## [Error when indexing document and analysing with "word delimiter" in ES 6.0.0-rc1](https://discuss.elastic.co/t/error-when-indexing-document-and-analysing-with-word-delimiter-in-es-6-0-0-rc1/105263)

<div class="topic-metadata">

**Author:** [@Upptec\_Isak](https://discuss.elastic.co/u/Upptec_Isak)\
**Replies:** 1\
**Last updated:** [October 27, 2017, 3:10pm UTC](https://discuss.elastic.co/t/error-when-indexing-document-and-analysing-with-word-delimiter-in-es-6-0-0-rc1/105263 "2017-10-27T15:10:19Z")

</div>

PUT foo { "index": { "analysis": { "filter": { "starts\_with": {"type": "edgeNGram", "max\_gram": 50, "min\_gram": 1}, "contains": {"type": "nGram", "max\_gram": 5…

---

## [Autocomplete search and sort on the same field](https://discuss.elastic.co/t/autocomplete-search-and-sort-on-the-same-field/105289)

<div class="topic-metadata">

**Author:** [@darrenm](https://discuss.elastic.co/u/darrenm)\
**Replies:** 1\
**Last updated:** [October 27, 2017, 3:07pm UTC](https://discuss.elastic.co/t/autocomplete-search-and-sort-on-the-same-field/105289 "2017-10-27T15:07:14Z")

</div>

Is there a way to apply autocomplete (edge\_ngram tokenizer) and case insensitive search on the same string field? For general search/sort we have been using (i'm using yaml format here for easier reading) normalizer: …

---

## [Elastic search is crashing on running multi span query](https://discuss.elastic.co/t/elastic-search-is-crashing-on-running-multi-span-query/105332)

<div class="topic-metadata">

**Author:** [@vdvc](https://discuss.elastic.co/u/vdvc)\
**Replies:** 1\
**Last updated:** [October 27, 2017, 3:04pm UTC](https://discuss.elastic.co/t/elastic-search-is-crashing-on-running-multi-span-query/105332 "2017-10-27T15:04:31Z")

</div>

Hi All, We have noticed an error in using multi span queries. We ran the following query from Kibana interface and noticed that elastic server is consistently crashing. We are having large volume of documents indexed i…

---

## [Add an Additional Role to Existing User through API](https://discuss.elastic.co/t/add-an-additional-role-to-existing-user-through-api/105479)

<div class="topic-metadata">

**Author:** [@nomAAd](https://discuss.elastic.co/u/nomAAd)\
**Replies:** 1\
**Last updated:** [October 27, 2017, 2:46pm UTC](https://discuss.elastic.co/t/add-an-additional-role-to-existing-user-through-api/105479 "2017-10-27T14:46:09Z")

</div>

Hi, I'm just wondering if there's a way of adding roles to existing users through an API call. I know you can edit users roles through this API call: POST /\_xpack/security/user/\<USER\> { "roles" : \[ "\<ROLE1\>","\<ROLE2\>"…

---

## [Agggregation question](https://discuss.elastic.co/t/agggregation-question/105559)

<div class="topic-metadata">

**Author:** [@pjanzen](https://discuss.elastic.co/u/pjanzen)\
**Replies:** 1\
**Last updated:** [October 27, 2017, 2:24pm UTC](https://discuss.elastic.co/t/agggregation-question/105559 "2017-10-27T14:24:21Z")

</div>

Hi All, I have the below aggregation and I wonder if it is possible to do the aggregation only when the hdr\_subject has 10 or more documents in that time frame. Is it possible to apply a filter of some sort? { "size"…

---

## [Difference between cpu usage in node stats](https://discuss.elastic.co/t/difference-between-cpu-usage-in-node-stats/104816)

<div class="topic-metadata">

**Author:** [@fhalde](https://discuss.elastic.co/u/fhalde)\
**Replies:** 3\
**Last updated:** [October 27, 2017, 12:58pm UTC](https://discuss.elastic.co/t/difference-between-cpu-usage-in-node-stats/104816 "2017-10-27T12:58:18Z")

</div>

Node stats provides us with multiple cpu usage metrics. I'd like to know the difference between the below 2 v2.4.4 os.cpu\_percentage / os.load\_average process.cpu.percent Which is the real indicator of the cpu usage …

---

## [Shard rebalance issue on addition of new data nodes across the cluster](https://discuss.elastic.co/t/shard-rebalance-issue-on-addition-of-new-data-nodes-across-the-cluster/105414)

<div class="topic-metadata">

**Author:** [@chitender](https://discuss.elastic.co/u/chitender)\
**Replies:** 5\
**Last updated:** [October 27, 2017, 12:38pm UTC](https://discuss.elastic.co/t/shard-rebalance-issue-on-addition-of-new-data-nodes-across-the-cluster/105414 "2017-10-27T12:38:58Z")

</div>

we were running ES cluster version 2.4.0 with 3 master, 3data nodes and one client node. this time shards were evenly distributed to all three data nodes. now to increase the storage and computing power we added the two …

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

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