# Facets not showing complete list

**URL:** https://discuss.elastic.co/t/facets-not-showing-complete-list/16175
**Category:** Elasticsearch
**Created:** [March 5, 2014, 4:49pm UTC](https://discuss.elastic.co/t/facets-not-showing-complete-list/16175 "2014-03-05T16:49:13Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![john\_6](https://avatars.discourse-cdn.com/v4/letter/j/a9adbd/32.png) [@john\_6](https://discuss.elastic.co/u/john_6)
#### Post date: [March 5, 2014, 4:49pm UTC](https://discuss.elastic.co/t/facets-not-showing-complete-list/16175/1 "2014-03-05T16:49:13Z")

</div>

I have a search instance that has a complete set of data, which I have  
tested by specifically searching for some terms that are missing from my  
facets list, and they return results, so I know they have been indexed, yet  
they don't show up in the facets.

To test I have been running the following query:

{  
"explain": true,  
"sort": [{  
"ordering\_field": "desc"  
}, "\_score"],  
"size": 15,  
"from": 0,  
"query": {  
"match\_all" : { }  
},  
"facets": {  
"mood": {  
"terms": {  
"field": "recipes.moods"  
}  
}  
}  
}

The facets part of the result is as follows:

"facets": {  
"mood": {  
"\_type": "terms",  
"missing": 3312,  
"total": 11116,  
"other": 133,  
"terms": [{  
"term": "Comfort",  
"count": 2904  
}, {  
"term": "Sweet toothed",  
"count": 1683  
}, {  
"term": "Nibbly",  
"count": 1332  
}, {  
"term": "Fun",  
"count": 1286  
}, {  
"term": "Sociable",  
"count": 1271  
}, {  
"term": "Indulgent",  
"count": 1104  
}, {  
"term": "Impatient",  
"count": 623  
}, {  
"term": "Asian-inspired",  
"count": 327  
}, {  
"term": "Italian-inspired",  
"count": 268  
}, {  
"term": "Romantic",  
"count": 185  
}]  
}  
}

The problem here is that there should be results for: "Mexican-inspired"  
(56 docs), "French-inspired" (46 docs) and "Middle-eastern-inspired" (31  
docs). These have documents in the index, so I am completely at a loss as  
to why they aren't being returned by this simple facets request. Now I can  
see that adding these up to a single number matches the "other" count in  
that list. How can I get them to display properly?

Anyone come across this before?

Thanks in advance,  
John.

--  
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/0818b940-74d2-4933-9104-d640172b7635%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/0818b940-74d2-4933-9104-d640172b7635%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Binh\_Ly\_2](https://avatars.discourse-cdn.com/v4/letter/b/d07c76/32.png) [@Binh\_Ly\_2](https://discuss.elastic.co/u/Binh_Ly_2)
#### Post date: [March 5, 2014, 4:55pm UTC](https://discuss.elastic.co/t/facets-not-showing-complete-list/16175/2 "2014-03-05T16:55:19Z")

</div>

You can either increase the size of terms returned (default 10) or ask for  
all of them to be returned:

{  
"facets": {  
"mood": {  
"terms": {  
"size": 50,  
"field": "recipes.moods"  
}  
}  
}  
}

Or

{  
"facets": {  
"mood": {  
"terms": {  
"field": "recipes.moods",  
"all\_terms": true  
}  
}  
}  
}

--  
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/05cb0d28-b370-4069-b760-b6087ea3b01c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/05cb0d28-b370-4069-b760-b6087ea3b01c%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![john\_6](https://avatars.discourse-cdn.com/v4/letter/j/a9adbd/32.png) [@john\_6](https://discuss.elastic.co/u/john_6)
#### Post date: [March 5, 2014, 5:03pm UTC](https://discuss.elastic.co/t/facets-not-showing-complete-list/16175/3 "2014-03-05T17:03:16Z")

</div>

RTFM it seems. I didn't know it was defaulted to limit to 10 results.

On Wednesday, March 5, 2014 4:49:13 PM UTC, [jo...@embarknow.co.uk](mailto:jo...@embarknow.co.uk) wrote:

> I have a search instance that has a complete set of data, which I have  
> tested by specifically searching for some terms that are missing from my  
> facets list, and they return results, so I know they have been indexed, yet  
> they don't show up in the facets.
> 
> To test I have been running the following query:
> 
> {  
> "explain": true,  
> "sort": [{  
> "ordering\_field": "desc"  
> }, "\_score"],  
> "size": 15,  
> "from": 0,  
> "query": {  
> "match\_all" : { }  
> },  
> "facets": {  
> "mood": {  
> "terms": {  
> "field": "recipes.moods"  
> }  
> }  
> }  
> }
> 
> The facets part of the result is as follows:
> 
> "facets": {  
> "mood": {  
> "\_type": "terms",  
> "missing": 3312,  
> "total": 11116,  
> "other": 133,  
> "terms": [{  
> "term": "Comfort",  
> "count": 2904  
> }, {  
> "term": "Sweet toothed",  
> "count": 1683  
> }, {  
> "term": "Nibbly",  
> "count": 1332  
> }, {  
> "term": "Fun",  
> "count": 1286  
> }, {  
> "term": "Sociable",  
> "count": 1271  
> }, {  
> "term": "Indulgent",  
> "count": 1104  
> }, {  
> "term": "Impatient",  
> "count": 623  
> }, {  
> "term": "Asian-inspired",  
> "count": 327  
> }, {  
> "term": "Italian-inspired",  
> "count": 268  
> }, {  
> "term": "Romantic",  
> "count": 185  
> }]  
> }  
> }
> 
> The problem here is that there should be results for: "Mexican-inspired"  
> (56 docs), "French-inspired" (46 docs) and "Middle-eastern-inspired" (31  
> docs). These have documents in the index, so I am completely at a loss as  
> to why they aren't being returned by this simple facets request. Now I can  
> see that adding these up to a single number matches the "other" count in  
> that list. How can I get them to display properly?
> 
> Anyone come across this before?
> 
> Thanks in advance,  
> John.

--  
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/45b42de1-dd1c-4caf-bb26-f488d382466a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/45b42de1-dd1c-4caf-bb26-f488d382466a%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![john\_6](https://avatars.discourse-cdn.com/v4/letter/j/a9adbd/32.png) [@john\_6](https://discuss.elastic.co/u/john_6)
#### Post date: [March 5, 2014, 5:04pm UTC](https://discuss.elastic.co/t/facets-not-showing-complete-list/16175/4 "2014-03-05T17:04:06Z")

</div>

I was just writing my response as you posted. Thanks for the response, I  
will learn to read the manual 😉

On Wednesday, March 5, 2014 4:55:19 PM UTC, Binh Ly wrote:

> You can either increase the size of terms returned (default 10) or ask for  
> all of them to be returned:
> 
> {  
> "facets": {  
> "mood": {  
> "terms": {  
> "size": 50,  
> "field": "recipes.moods"  
> }  
> }  
> }  
> }
> 
> Or
> 
> {  
> "facets": {  
> "mood": {  
> "terms": {  
> "field": "recipes.moods",  
> "all\_terms": true  
> }  
> }  
> }  
> }

--  
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/689b3125-632b-4136-9993-19538801206e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/689b3125-632b-4136-9993-19538801206e%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:45am UTC](https://discuss.elastic.co/t/facets-not-showing-complete-list/16175/5 "2017-07-06T01:45:30Z")

</div>


