# Facets loading time

**URL:** https://discuss.elastic.co/t/facets-loading-time/15217
**Category:** Elasticsearch
**Created:** [January 13, 2014, 8:46am UTC](https://discuss.elastic.co/t/facets-loading-time/15217 "2014-01-13T08:46:39Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![oreno](https://avatars.discourse-cdn.com/v4/letter/o/b4bc9f/32.png) [@oreno](https://discuss.elastic.co/u/oreno)
#### Post date: [January 13, 2014, 8:46am UTC](https://discuss.elastic.co/t/facets-loading-time/15217/1 "2014-01-13T08:46:39Z")

</div>

Hi,  
is there any way to improve facets loading time (into memory)?  
I'm using field facets on a single string field and It's kind of a problem that the first query after indexing period is taking a long time (many unique users).

Has anyone ever faced this problem?  
is there anyway to set the fields to load to cache automatically while indexing or warming up the index?

Thanks in advanced,

Oren

---

<div class="post-metadata">

### Author: ![Lukas\_Vlcek1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_vlcek1/32/819_2.png) [@Lukas\_Vlcek1](https://discuss.elastic.co/u/Lukas_Vlcek1)
#### Post date: [January 13, 2014, 12:11pm UTC](https://discuss.elastic.co/t/facets-loading-time/15217/2 "2014-01-13T12:11:53Z")

</div>

Hi,

did you try

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

?

Regards,  
Lukas

On Mon, Jan 13, 2014 at 9:46 AM, oreno [oreno@exelate.com](mailto:oreno@exelate.com) wrote:

> Hi,  
> is there any way to improve facets loading time (into memory)?  
> I'm using field facets on a single string field and It's kind of a problem  
> that the first query after indexing period is taking a long time (many  
> unique users).
> 
> Has anyone ever faced this problem?  
> is there anyway to set the fields to load to cache automatically while  
> indexing or warming up the index?
> 
> Thanks in advanced,
> 
> Oren
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/Facets-loading-time-tp4047460.html](http://elasticsearch-users.115913.n3.nabble.com/Facets-loading-time-tp4047460.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/1389602799729-4047460.post%40n3.nabble.com](https://groups.google.com/d/msgid/elasticsearch/1389602799729-4047460.post%40n3.nabble.com)  
> .  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAO9cvUZCf\_QJ4k5tAM7d0z7-98s3cOhM8hNr8uQ8GR\_R0dU3Ow%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAO9cvUZCf_QJ4k5tAM7d0z7-98s3cOhM8hNr8uQ8GR_R0dU3Ow%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [January 14, 2014, 12:02pm UTC](https://discuss.elastic.co/t/facets-loading-time/15217/3 "2014-01-14T12:02:38Z")

</div>

Hey,

in addition/alternatively you could also look at warmers

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

--Alex

On Mon, Jan 13, 2014 at 1:11 PM, Lukáš Vlček [lukas.vlcek@gmail.com](mailto:lukas.vlcek@gmail.com) wrote:

> Hi,
> 
> did you try  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/_field_data_formats.html#_fielddata_loading)  
> ?
> 
> Regards,  
> Lukas
> 
> On Mon, Jan 13, 2014 at 9:46 AM, oreno [oreno@exelate.com](mailto:oreno@exelate.com) wrote:
> 
> > Hi,  
> > is there any way to improve facets loading time (into memory)?  
> > I'm using field facets on a single string field and It's kind of a problem  
> > that the first query after indexing period is taking a long time (many  
> > unique users).
> > 
> > Has anyone ever faced this problem?  
> > is there anyway to set the fields to load to cache automatically while  
> > indexing or warming up the index?
> > 
> > Thanks in advanced,
> > 
> > Oren
> > 
> > --  
> > View this message in context:  
> > [http://elasticsearch-users.115913.n3.nabble.com/Facets-loading-time-tp4047460.html](http://elasticsearch-users.115913.n3.nabble.com/Facets-loading-time-tp4047460.html)  
> > Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/1389602799729-4047460.post%40n3.nabble.com](https://groups.google.com/d/msgid/elasticsearch/1389602799729-4047460.post%40n3.nabble.com)  
> > .  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CAO9cvUZCf\_QJ4k5tAM7d0z7-98s3cOhM8hNr8uQ8GR\_R0dU3Ow%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAO9cvUZCf_QJ4k5tAM7d0z7-98s3cOhM8hNr8uQ8GR_R0dU3Ow%40mail.gmail.com)  
> .
> 
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAGCwEM-utXbFvM-T5jnrPqb-owwhzoC68-Ks8LpN-QF1kPgHWg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGCwEM-utXbFvM-T5jnrPqb-owwhzoC68-Ks8LpN-QF1kPgHWg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![oreno](https://avatars.discourse-cdn.com/v4/letter/o/b4bc9f/32.png) [@oreno](https://discuss.elastic.co/u/oreno)
#### Post date: [January 14, 2014, 1:11pm UTC](https://discuss.elastic.co/t/facets-loading-time/15217/4 "2014-01-14T13:11:56Z")

</div>

Hi Alexander,  
yes warmers is exactly what I'm looking into right now.  
Seems like a good solution, but I still have a problem there.  
As shown below, I have a facet\_filter with changing dates, so I'm having a hard time understanding what my warmer should look like if I want all the range possibilities to work fast.

I tried running the next warmer for loading both time and productCode fields, but I'm still not sure this is the best I can get here.

Any suggestions?

warmer:  
{  
"query" : {  
"match\_all" : {}  
},  
"facets": {  
"tags": {  
"terms": {  
"fields": ["productCode", "time"]  
},  
"nested": "products"  
}  
}  
}

query:  
{  
"query": {  
"match\_all": {}  
},  
"size": 0,  
"facets": {  
"tags": {  
"terms": {  
"field": "productCode",  
"size": 230,  
"regex": "GGG\d+",  
"order": "term"  
},  
"nested": "products",  
"facet\_filter": {  
"range": {  
"products.time": {  
"from": "2014-01-07",  
"to": "2014-01-10",  
"include\_lower": true,  
"include\_upper": true  
}  
}  
}  
}  
}  
}

---

<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: [July 6, 2017, 1:56am UTC](https://discuss.elastic.co/t/facets-loading-time/15217/5 "2017-07-06T01:56:55Z")

</div>


