# Terms facet all\_terms does not work

**URL:** <https://discuss.elastic.co/t/terms-facet-all-terms-does-not-work/6093>\
**Category:** Elasticsearch\
**Created:** [December 7, 2011, 9:35pm UTC](https://discuss.elastic.co/t/terms-facet-all-terms-does-not-work/6093 "2011-12-07T21:35:02Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mustafa\_Sener](https://avatars.discourse-cdn.com/v4/letter/m/ed8c4c/32.png) [@Mustafa\_Sener](https://discuss.elastic.co/u/Mustafa_Sener)\
**Post date:** [December 7, 2011, 9:35pm UTC](https://discuss.elastic.co/t/terms-facet-all-terms-does-not-work/6093/1 "2011-12-07T21:35:02Z")

</div>

Hi,  
I want to get all terms of a field. For this purpose I used all\_terms  
property in terms facet. However, it does not work. In my test I had 1000  
distinct terms for a field. However, when I executed terms facet with  
"all\_terms":true parameter, it just returns first 10 terms. Is all\_terms  
deprecated?

--  
Mustafa Sener  
[www.ifountain.com](http://www.ifountain.com)

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [December 7, 2011, 9:42pm UTC](https://discuss.elastic.co/t/terms-facet-all-terms-does-not-work/6093/2 "2011-12-07T21:42:45Z")

</div>

all\_terms is a bad name..., it basically means that you will get back terms  
with 0 count as well. There is no option to get back all terms back, open  
an issue?

On Wed, Dec 7, 2011 at 11:35 PM, Mustafa Sener [mustafa.sener@gmail.com](mailto:mustafa.sener@gmail.com)wrote:

> Hi,  
> I want to get all terms of a field. For this purpose I used all\_terms  
> property in terms facet. However, it does not work. In my test I had 1000  
> distinct terms for a field. However, when I executed terms facet with  
> "all\_terms":true parameter, it just returns first 10 terms. Is all\_terms  
> deprecated?
> 
> --  
> Mustafa Sener  
> [www.ifountain.com](http://www.ifountain.com)

---

<div class="post-metadata">

**Author:** ![project2501](https://avatars.discourse-cdn.com/v4/letter/p/41988e/32.png) [@project2501](https://discuss.elastic.co/u/project2501)\
**Post date:** [December 8, 2011, 3:37pm UTC](https://discuss.elastic.co/t/terms-facet-all-terms-does-not-work/6093/3 "2011-12-08T15:37:51Z")

</div>

Hi,  
I was going to ask about this as well. I use the termscomponent in  
Solr and am migrating to ES.  
The Solr termscomponent will return all the terms in the index (for a  
field) with frequency counts on them.

From the above reply, it seems ES does not have a similar feature so I  
vote to open an issue to expose  
this Lucene capability in similar fashion.

On Dec 7, 4:42 pm, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:

> all\_terms is a bad name..., it basically means that you will get back terms  
> with 0 count as well. There is no option to get back all terms back, open  
> an issue?
> 
> On Wed, Dec 7, 2011 at 11:35 PM, Mustafa Sener [mustafa.se...@gmail.com](mailto:mustafa.se...@gmail.com)wrote:
> 
> > Hi,  
> > I want to get all terms of a field. For this purpose I used all\_terms  
> > property in terms facet. However, it does not work. In my test I had 1000  
> > distinct terms for a field. However, when I executed terms facet with  
> > "all\_terms":true parameter, it just returns first 10 terms. Is all\_terms  
> > deprecated?
> 
> > --  
> > Mustafa Sener  
> > [www.ifountain.com](http://www.ifountain.com)

---

<div class="post-metadata">

**Author:** ![Loco\_Jay](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/loco_jay/32/2982_2.png) [@Loco\_Jay](https://discuss.elastic.co/u/Loco_Jay)\
**Post date:** [December 8, 2011, 3:41pm UTC](https://discuss.elastic.co/t/terms-facet-all-terms-does-not-work/6093/4 "2011-12-08T15:41:40Z")

</div>

+1 for issue (using 2 calls at moment)  
+1 for field cache ability to got to disk and use less mem

On Dec 8, 2011, at 10:37 AM, project2501 wrote:

> Hi,  
> I was going to ask about this as well. I use the termscomponent in  
> Solr and am migrating to ES.  
> The Solr termscomponent will return all the terms in the index (for a  
> field) with frequency counts on them.
> 
> From the above reply, it seems ES does not have a similar feature so I  
> vote to open an issue to expose  
> this Lucene capability in similar fashion.
> 
> On Dec 7, 4:42 pm, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> 
> > all\_terms is a bad name..., it basically means that you will get back terms  
> > with 0 count as well. There is no option to get back all terms back, open  
> > an issue?
> > 
> > On Wed, Dec 7, 2011 at 11:35 PM, Mustafa Sener [mustafa.se...@gmail.com](mailto:mustafa.se...@gmail.com)wrote:
> > 
> > > Hi,  
> > > I want to get all terms of a field. For this purpose I used all\_terms  
> > > property in terms facet. However, it does not work. In my test I had 1000  
> > > distinct terms for a field. However, when I executed terms facet with  
> > > "all\_terms":true parameter, it just returns first 10 terms. Is all\_terms  
> > > deprecated?
> > 
> > > --  
> > > Mustafa Sener  
> > > [www.ifountain.com](http://www.ifountain.com)

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [December 8, 2011, 7:57pm UTC](https://discuss.elastic.co/t/terms-facet-all-terms-does-not-work/6093/5 "2011-12-08T19:57:01Z")

</div>

Let me jump aboard and say that I am also looking for similar capabilities.

Currently evaluating the feasibility of converting a modified Lucene  
project to Elasticsearch, and the functionality that I am not able to  
replicate is the use of TermDocs. Elasticsearch has its own version of  
FieldCache and I am currently looking at what precisely does it  
contain and if I can be exposed. Having the ability to retrieve all  
terms for a field will eliminate the need to access the FieldCache,  
especially since I would need to execute some warmup queries in order  
to populate it.

Ivan

On Thu, Dec 8, 2011 at 7:41 AM, Loco Jay [locojaydev@gmail.com](mailto:locojaydev@gmail.com) wrote:

> +1 for issue (using 2 calls at moment)  
> +1 for field cache ability to got to disk and use less mem
> 
> On Dec 8, 2011, at 10:37 AM, project2501 wrote:
> 
> > Hi,  
> > I was going to ask about this as well. I use the termscomponent in  
> > Solr and am migrating to ES.  
> > The Solr termscomponent will return all the terms in the index (for a  
> > field) with frequency counts on them.
> > 
> > From the above reply, it seems ES does not have a similar feature so I  
> > vote to open an issue to expose  
> > this Lucene capability in similar fashion.
> > 
> > On Dec 7, 4:42 pm, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> > 
> > > all\_terms is a bad name..., it basically means that you will get back terms  
> > > with 0 count as well. There is no option to get back all terms back, open  
> > > an issue?
> > > 
> > > On Wed, Dec 7, 2011 at 11:35 PM, Mustafa Sener [mustafa.se...@gmail.com](mailto:mustafa.se...@gmail.com)wrote:
> > > 
> > > > Hi,  
> > > > I want to get all terms of a field. For this purpose I used all\_terms  
> > > > property in terms facet. However, it does not work. In my test I had 1000  
> > > > distinct terms for a field. However, when I executed terms facet with  
> > > > "all\_terms":true parameter, it just returns first 10 terms. Is all\_terms  
> > > > deprecated?
> > > 
> > > > --  
> > > > Mustafa Sener  
> > > > [www.ifountain.com](http://www.ifountain.com)

---

<div class="post-metadata">

**Author:** ![Mustafa\_Sener](https://avatars.discourse-cdn.com/v4/letter/m/ed8c4c/32.png) [@Mustafa\_Sener](https://discuss.elastic.co/u/Mustafa_Sener)\
**Post date:** [December 9, 2011, 6:51am UTC](https://discuss.elastic.co/t/terms-facet-all-terms-does-not-work/6093/6 "2011-12-09T06:51:02Z")

</div>

Hi,  
I created an issue

> <https://github.com/elastic/elasticsearch/issues/1530>
>
> Currently terms facet has an option all\_terms which is expected to bring all the… terms in the index (for a
> field) with frequency counts on them. However, it does not work. Can you fix this?
> 
> Discussed in 
> http://elasticsearch-users.115913.n3.nabble.com/Terms-facet-all-terms-does-not-work-td3568708.html

On Thu, Dec 8, 2011 at 9:57 PM, Ivan Brusic [ivan@brusic.com](mailto:ivan@brusic.com) wrote:

> Let me jump aboard and say that I am also looking for similar capabilities.
> 
> Currently evaluating the feasibility of converting a modified Lucene  
> project to Elasticsearch, and the functionality that I am not able to  
> replicate is the use of TermDocs. Elasticsearch has its own version of  
> FieldCache and I am currently looking at what precisely does it  
> contain and if I can be exposed. Having the ability to retrieve all  
> terms for a field will eliminate the need to access the FieldCache,  
> especially since I would need to execute some warmup queries in order  
> to populate it.
> 
> Ivan
> 
> On Thu, Dec 8, 2011 at 7:41 AM, Loco Jay [locojaydev@gmail.com](mailto:locojaydev@gmail.com) wrote:
> 
> > +1 for issue (using 2 calls at moment)  
> > +1 for field cache ability to got to disk and use less mem
> > 
> > On Dec 8, 2011, at 10:37 AM, project2501 wrote:
> > 
> > > Hi,  
> > > I was going to ask about this as well. I use the termscomponent in  
> > > Solr and am migrating to ES.  
> > > The Solr termscomponent will return all the terms in the index (for a  
> > > field) with frequency counts on them.
> > > 
> > > From the above reply, it seems ES does not have a similar feature so I  
> > > vote to open an issue to expose  
> > > this Lucene capability in similar fashion.
> > > 
> > > On Dec 7, 4:42 pm, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> > > 
> > > > all\_terms is a bad name..., it basically means that you will get back  
> > > > terms  
> > > > with 0 count as well. There is no option to get back all terms back,  
> > > > open  
> > > > an issue?
> > > > 
> > > > On Wed, Dec 7, 2011 at 11:35 PM, Mustafa Sener \<  
> > > > [mustafa.se...@gmail.com](mailto:mustafa.se...@gmail.com)\>wrote:
> > > > 
> > > > > Hi,  
> > > > > I want to get all terms of a field. For this purpose I used all\_terms  
> > > > > property in terms facet. However, it does not work. In my test I had  
> > > > > 1000  
> > > > > distinct terms for a field. However, when I executed terms facet with  
> > > > > "all\_terms":true parameter, it just returns first 10 terms. Is  
> > > > > all\_terms  
> > > > > deprecated?
> > > > 
> > > > > --  
> > > > > Mustafa Sener  
> > > > > [www.ifountain.com](http://www.ifountain.com)

--  
Mustafa Sener  
[www.ifountain.com](http://www.ifountain.com)  
WebRep  
Overall rating

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [December 9, 2011, 10:34pm UTC](https://discuss.elastic.co/t/terms-facet-all-terms-does-not-work/6093/7 "2011-12-09T22:34:46Z")

</div>

What exactly are you looking for when working with TermDocs?

On Thu, Dec 8, 2011 at 9:57 PM, Ivan Brusic [ivan@brusic.com](mailto:ivan@brusic.com) wrote:

> Let me jump aboard and say that I am also looking for similar capabilities.
> 
> Currently evaluating the feasibility of converting a modified Lucene  
> project to Elasticsearch, and the functionality that I am not able to  
> replicate is the use of TermDocs. Elasticsearch has its own version of  
> FieldCache and I am currently looking at what precisely does it  
> contain and if I can be exposed. Having the ability to retrieve all  
> terms for a field will eliminate the need to access the FieldCache,  
> especially since I would need to execute some warmup queries in order  
> to populate it.
> 
> Ivan
> 
> On Thu, Dec 8, 2011 at 7:41 AM, Loco Jay [locojaydev@gmail.com](mailto:locojaydev@gmail.com) wrote:
> 
> > +1 for issue (using 2 calls at moment)  
> > +1 for field cache ability to got to disk and use less mem
> > 
> > On Dec 8, 2011, at 10:37 AM, project2501 wrote:
> > 
> > > Hi,  
> > > I was going to ask about this as well. I use the termscomponent in  
> > > Solr and am migrating to ES.  
> > > The Solr termscomponent will return all the terms in the index (for a  
> > > field) with frequency counts on them.
> > > 
> > > From the above reply, it seems ES does not have a similar feature so I  
> > > vote to open an issue to expose  
> > > this Lucene capability in similar fashion.
> > > 
> > > On Dec 7, 4:42 pm, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> > > 
> > > > all\_terms is a bad name..., it basically means that you will get back  
> > > > terms  
> > > > with 0 count as well. There is no option to get back all terms back,  
> > > > open  
> > > > an issue?
> > > > 
> > > > On Wed, Dec 7, 2011 at 11:35 PM, Mustafa Sener \<  
> > > > [mustafa.se...@gmail.com](mailto:mustafa.se...@gmail.com)\>wrote:
> > > > 
> > > > > Hi,  
> > > > > I want to get all terms of a field. For this purpose I used all\_terms  
> > > > > property in terms facet. However, it does not work. In my test I had  
> > > > > 1000  
> > > > > distinct terms for a field. However, when I executed terms facet with  
> > > > > "all\_terms":true parameter, it just returns first 10 terms. Is  
> > > > > all\_terms  
> > > > > deprecated?
> > > > 
> > > > > --  
> > > > > Mustafa Sener  
> > > > > [www.ifountain.com](http://www.ifountain.com)

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [December 12, 2011, 3:13am UTC](https://discuss.elastic.co/t/terms-facet-all-terms-does-not-work/6093/8 "2011-12-12T03:13:06Z")

</div>

The use of TermDocs is to simply get all values for a specific term.  
The existing Lucene infrastructure uses this information at startup to  
pre-calculate/cache various properties of the system and to provide  
some type of faceting. Not looking to get TermDoc access in  
Elasticsearch, but a method to get all terms would be nice.

On Fri, Dec 9, 2011 at 2:34 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:

> What exactly are you looking for when working with TermDocs?
> 
> On Thu, Dec 8, 2011 at 9:57 PM, Ivan Brusic [ivan@brusic.com](mailto:ivan@brusic.com) wrote:
> 
> > Let me jump aboard and say that I am also looking for similar  
> > capabilities.
> > 
> > Currently evaluating the feasibility of converting a modified Lucene  
> > project to Elasticsearch, and the functionality that I am not able to  
> > replicate is the use of TermDocs. Elasticsearch has its own version of  
> > FieldCache and I am currently looking at what precisely does it  
> > contain and if I can be exposed. Having the ability to retrieve all  
> > terms for a field will eliminate the need to access the FieldCache,  
> > especially since I would need to execute some warmup queries in order  
> > to populate it.
> > 
> > Ivan
> > 
> > On Thu, Dec 8, 2011 at 7:41 AM, Loco Jay [locojaydev@gmail.com](mailto:locojaydev@gmail.com) wrote:
> > 
> > > +1 for issue (using 2 calls at moment)  
> > > +1 for field cache ability to got to disk and use less mem
> > > 
> > > On Dec 8, 2011, at 10:37 AM, project2501 wrote:
> > > 
> > > > Hi,  
> > > > I was going to ask about this as well. I use the termscomponent in  
> > > > Solr and am migrating to ES.  
> > > > The Solr termscomponent will return all the terms in the index (for a  
> > > > field) with frequency counts on them.
> > > > 
> > > > From the above reply, it seems ES does not have a similar feature so I  
> > > > vote to open an issue to expose  
> > > > this Lucene capability in similar fashion.
> > > > 
> > > > On Dec 7, 4:42 pm, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> > > > 
> > > > > all\_terms is a bad name..., it basically means that you will get back  
> > > > > terms  
> > > > > with 0 count as well. There is no option to get back all terms back,  
> > > > > open  
> > > > > an issue?
> > > > > 
> > > > > On Wed, Dec 7, 2011 at 11:35 PM, Mustafa Sener  
> > > > > [mustafa.se...@gmail.com](mailto:mustafa.se...@gmail.com)wrote:
> > > > > 
> > > > > > Hi,  
> > > > > > I want to get all terms of a field. For this purpose I used all\_terms  
> > > > > > property in terms facet. However, it does not work. In my test I had  
> > > > > > 1000  
> > > > > > distinct terms for a field. However, when I executed terms facet with  
> > > > > > "all\_terms":true parameter, it just returns first 10 terms. Is  
> > > > > > all\_terms  
> > > > > > deprecated?
> > > > > 
> > > > > > --  
> > > > > > Mustafa Sener  
> > > > > > [www.ifountain.com](http://www.ifountain.com)

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [December 12, 2011, 12:58pm UTC](https://discuss.elastic.co/t/terms-facet-all-terms-does-not-work/6093/9 "2011-12-12T12:58:34Z")

</div>

There used to be a terms API in elasticsearch that returned all terms for a  
field, but it was not properly implemented (i.e. paginating through it  
while still having a consistent view, similar to scrolling), so it was  
removed. We can try and implement it again properly...

On Mon, Dec 12, 2011 at 5:13 AM, Ivan Brusic [ivan@brusic.com](mailto:ivan@brusic.com) wrote:

> The use of TermDocs is to simply get all values for a specific term.  
> The existing Lucene infrastructure uses this information at startup to  
> pre-calculate/cache various properties of the system and to provide  
> some type of faceting. Not looking to get TermDoc access in  
> Elasticsearch, but a method to get all terms would be nice.
> 
> On Fri, Dec 9, 2011 at 2:34 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:
> 
> > What exactly are you looking for when working with TermDocs?
> > 
> > On Thu, Dec 8, 2011 at 9:57 PM, Ivan Brusic [ivan@brusic.com](mailto:ivan@brusic.com) wrote:
> > 
> > > Let me jump aboard and say that I am also looking for similar  
> > > capabilities.
> > > 
> > > Currently evaluating the feasibility of converting a modified Lucene  
> > > project to Elasticsearch, and the functionality that I am not able to  
> > > replicate is the use of TermDocs. Elasticsearch has its own version of  
> > > FieldCache and I am currently looking at what precisely does it  
> > > contain and if I can be exposed. Having the ability to retrieve all  
> > > terms for a field will eliminate the need to access the FieldCache,  
> > > especially since I would need to execute some warmup queries in order  
> > > to populate it.
> > > 
> > > Ivan
> > > 
> > > On Thu, Dec 8, 2011 at 7:41 AM, Loco Jay [locojaydev@gmail.com](mailto:locojaydev@gmail.com) wrote:
> > > 
> > > > +1 for issue (using 2 calls at moment)  
> > > > +1 for field cache ability to got to disk and use less mem
> > > > 
> > > > On Dec 8, 2011, at 10:37 AM, project2501 wrote:
> > > > 
> > > > > Hi,  
> > > > > I was going to ask about this as well. I use the termscomponent in  
> > > > > Solr and am migrating to ES.  
> > > > > The Solr termscomponent will return all the terms in the index (for a  
> > > > > field) with frequency counts on them.
> > > > > 
> > > > > From the above reply, it seems ES does not have a similar feature so  
> > > > > I  
> > > > > vote to open an issue to expose  
> > > > > this Lucene capability in similar fashion.
> > > > > 
> > > > > On Dec 7, 4:42 pm, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> > > > > 
> > > > > > all\_terms is a bad name..., it basically means that you will get  
> > > > > > back  
> > > > > > terms  
> > > > > > with 0 count as well. There is no option to get back all terms back,  
> > > > > > open  
> > > > > > an issue?
> > > > > > 
> > > > > > On Wed, Dec 7, 2011 at 11:35 PM, Mustafa Sener  
> > > > > > [mustafa.se...@gmail.com](mailto:mustafa.se...@gmail.com)wrote:
> > > > > > 
> > > > > > > Hi,  
> > > > > > > I want to get all terms of a field. For this purpose I used  
> > > > > > > all\_terms  
> > > > > > > property in terms facet. However, it does not work. In my test I  
> > > > > > > had  
> > > > > > > 1000  
> > > > > > > distinct terms for a field. However, when I executed terms facet  
> > > > > > > with  
> > > > > > > "all\_terms":true parameter, it just returns first 10 terms. Is  
> > > > > > > all\_terms  
> > > > > > > deprecated?
> > > > > > 
> > > > > > > --  
> > > > > > > Mustafa Sener  
> > > > > > > [www.ifountain.com](http://www.ifountain.com)

---

<div class="post-metadata">

**Author:** ![project2501](https://avatars.discourse-cdn.com/v4/letter/p/41988e/32.png) [@project2501](https://discuss.elastic.co/u/project2501)\
**Post date:** [December 12, 2011, 2:01pm UTC](https://discuss.elastic.co/t/terms-facet-all-terms-does-not-work/6093/10 "2011-12-12T14:01:46Z")

</div>

That would be great! Thanks.

Also, I'm not sure if Lucene supports this, but it would be cool if  
the terms feature  
can work for search results too, thereby limiting the term vectors to  
only those contained in document results.  
The current behavior I see (from using Solr's terms component) is that  
you can only get  
terms from the whole index.

On Dec 12, 7:58 am, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:

> There used to be a terms API in elasticsearch that returned all terms for a  
> field, but it was not properly implemented (i.e. paginating through it  
> while still having a consistent view, similar to scrolling), so it was  
> removed. We can try and implement it again properly...
> 
> On Mon, Dec 12, 2011 at 5:13 AM, Ivan Brusic [i...@brusic.com](mailto:i...@brusic.com) wrote:
> 
> > The use of TermDocs is to simply get all values for a specific term.  
> > The existing Lucene infrastructure uses this information at startup to  
> > pre-calculate/cache various properties of the system and to provide  
> > some type of faceting. Not looking to get TermDoc access in  
> > Elasticsearch, but a method to get all terms would be nice.
> 
> > On Fri, Dec 9, 2011 at 2:34 PM, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> > 
> > > What exactly are you looking for when working with TermDocs?
> 
> > > On Thu, Dec 8, 2011 at 9:57 PM, Ivan Brusic [i...@brusic.com](mailto:i...@brusic.com) wrote:
> 
> > > > Let me jump aboard and say that I am also looking for similar  
> > > > capabilities.
> 
> > > > Currently evaluating the feasibility of converting a modified Lucene  
> > > > project to Elasticsearch, and the functionality that I am not able to  
> > > > replicate is the use of TermDocs. Elasticsearch has its own version of  
> > > > FieldCache and I am currently looking at what precisely does it  
> > > > contain and if I can be exposed. Having the ability to retrieve all  
> > > > terms for a field will eliminate the need to access the FieldCache,  
> > > > especially since I would need to execute some warmup queries in order  
> > > > to populate it.
> 
> > > > Ivan
> 
> > > > On Thu, Dec 8, 2011 at 7:41 AM, Loco Jay [locojay...@gmail.com](mailto:locojay...@gmail.com) wrote:
> > > > 
> > > > > +1 for issue (using 2 calls at moment)  
> > > > > +1 for field cache ability to got to disk and use less mem
> 
> > > > > On Dec 8, 2011, at 10:37 AM, project2501 wrote:
> 
> > > > > > Hi,  
> > > > > > I was going to ask about this as well. I use the termscomponent in  
> > > > > > Solr and am migrating to ES.  
> > > > > > The Solr termscomponent will return all the terms in the index (for a  
> > > > > > field) with frequency counts on them.
> 
> > > > > > From the above reply, it seems ES does not have a similar feature so  
> > > > > > I  
> > > > > > vote to open an issue to expose  
> > > > > > this Lucene capability in similar fashion.
> 
> > > > > > On Dec 7, 4:42 pm, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> > > > > > 
> > > > > > > all\_terms is a bad name..., it basically means that you will get  
> > > > > > > back  
> > > > > > > terms  
> > > > > > > with 0 count as well. There is no option to get back all terms back,  
> > > > > > > open  
> > > > > > > an issue?
> 
> > > > > > > On Wed, Dec 7, 2011 at 11:35 PM, Mustafa Sener  
> > > > > > > [mustafa.se...@gmail.com](mailto:mustafa.se...@gmail.com)wrote:
> 
> > > > > > > > Hi,  
> > > > > > > > I want to get all terms of a field. For this purpose I used  
> > > > > > > > all\_terms  
> > > > > > > > property in terms facet. However, it does not work. In my test I  
> > > > > > > > had  
> > > > > > > > 1000  
> > > > > > > > distinct terms for a field. However, when I executed terms facet  
> > > > > > > > with  
> > > > > > > > "all\_terms":true parameter, it just returns first 10 terms. Is  
> > > > > > > > all\_terms  
> > > > > > > > deprecated?
> 
> > > > > > > > --  
> > > > > > > > Mustafa Sener  
> > > > > > > > [www.ifountain.com](http://www.ifountain.com)

---

<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, 3:45am UTC](https://discuss.elastic.co/t/terms-facet-all-terms-does-not-work/6093/11 "2017-07-06T03:45:40Z")

</div>


