# High latency in first query to completion suggester

**URL:** <https://discuss.elastic.co/t/high-latency-in-first-query-to-completion-suggester/309679>\
**Category:** Elasticsearch\
**Created:** [July 14, 2022, 5:54pm UTC](https://discuss.elastic.co/t/high-latency-in-first-query-to-completion-suggester/309679 "2022-07-14T17:54:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mpinho](https://avatars.discourse-cdn.com/v4/letter/m/f475e1/32.png) [@mpinho](https://discuss.elastic.co/u/mpinho)\
**Post date:** [July 14, 2022, 5:54pm UTC](https://discuss.elastic.co/t/high-latency-in-first-query-to-completion-suggester/309679/1 "2022-07-14T17:54:11Z")

</div>

The first query to a completion suggester field after an indexation is taking several seconds to some minutes, whereas the following queries are in the tens of milliseconds (tested in Elastic 8.3).

I think this might be due to lazy loading of new FST segments into memory - is this possible?

If so, it is possible to make this loading eager, for example with the `index.store.preload` configuration? And which file extensions should be preloaded?  
[Preloading data into the file system cache | Elasticsearch Guide [8.3] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/preload-data-to-file-system-cache.html)

---

<div class="post-metadata">

**Author:** ![mpinho](https://avatars.discourse-cdn.com/v4/letter/m/f475e1/32.png) [@mpinho](https://discuss.elastic.co/u/mpinho)\
**Post date:** [July 25, 2022, 2:10pm UTC](https://discuss.elastic.co/t/high-latency-in-first-query-to-completion-suggester/309679/2 "2022-07-25T14:10:34Z")

</div>

Having a program periodically issue a query (e.g. every 10 seconds) resulted in much higher stability in the request latency, even while indexing is happening.

This seems like a valid use case for the index warmers, but unfortunately, they have been removed as of version 8.3.

> **[Warmers | Elasticsearch Guide \[8.3\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-warmers.html)**

Is there any alternative to having that periodic pinging? Should this be reported as an issue?

---

<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:** [August 22, 2022, 2:11pm UTC](https://discuss.elastic.co/t/high-latency-in-first-query-to-completion-suggester/309679/3 "2022-08-22T14:11:15Z")

</div>

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