# Completion suggester high memory usage

**URL:** <https://discuss.elastic.co/t/completion-suggester-high-memory-usage/293209>\
**Category:** Elasticsearch\
**Created:** [December 30, 2021, 2:26pm UTC](https://discuss.elastic.co/t/completion-suggester-high-memory-usage/293209 "2021-12-30T14:26:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![caseydm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/caseydm/32/26771_2.png) [@caseydm](https://discuss.elastic.co/u/caseydm)\
**Post date:** [December 30, 2021, 2:26pm UTC](https://discuss.elastic.co/t/completion-suggester-high-memory-usage/293209/1 "2021-12-30T14:26:51Z")

</div>

I am trying to add autocomplete to a field in Elasticsearch. The dataset is 260 million journal articles and I want to autocomplete based off of the title of the article. However, when I get to around 100 million indexed documents, memory increases so high that the cluster cannot handle it. This is for 60gb memory nodes. I checked the size of my completion data in memory and it is around 15gb.

Is there a way to reduce the memory usage? Can I some how start the autocomplete after a few characters rather than one? Or can I implement a simple word suggest with queries rather than full autocomplete? Trying to get something implemented for this problem and will appreciate any help!

Here are the field settings which I created using kibana index templates:

```auto
display_name": {
    "type": "text",
    "fields": {
      "complete": {
        "type": "completion",
        "analyzer": "simple",
        "preserve_separators": true,
        "preserve_position_increments": true,
        "max_input_length": 50
      },
      "keyword": {
        "type": "keyword"
      }
    }
  },

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 27, 2022, 2:27pm UTC](https://discuss.elastic.co/t/completion-suggester-high-memory-usage/293209/2 "2022-01-27T14:27:07Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
