# Creating a custom plugin to return hashes of the terms or the terms of an Elasticsearch index

**URL:** <https://discuss.elastic.co/t/creating-a-custom-plugin-to-return-hashes-of-the-terms-or-the-terms-of-an-elasticsearch-index/21236>\
**Category:** Elasticsearch\
**Created:** [December 12, 2014, 1:45pm UTC](https://discuss.elastic.co/t/creating-a-custom-plugin-to-return-hashes-of-the-terms-or-the-terms-of-an-elasticsearch-index/21236 "2014-12-12T13:45:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rosen\_Nikolov](https://avatars.discourse-cdn.com/v4/letter/r/ce73a5/32.png) [@Rosen\_Nikolov](https://discuss.elastic.co/u/Rosen_Nikolov)\
**Post date:** [December 12, 2014, 1:45pm UTC](https://discuss.elastic.co/t/creating-a-custom-plugin-to-return-hashes-of-the-terms-or-the-terms-of-an-elasticsearch-index/21236/1 "2014-12-12T13:45:08Z")

</div>

I am currently using an Elasticsearch plugin called "termlist"  
([https://github.com/jprante/elasticsearch-index-termlist](https://github.com/jprante/elasticsearch-index-termlist))  
that returns the terms of an index. But it breaks when there are too many  
terms and the output  
information is larger than about 30-40 megabytes. I need my custom plugin  
to work for bigger amounts of output data.

I am thinking about creating a custom plugin to return hashes of terms  
instead of the actual terms to reduce the output data volume.

So I have a couple of questions:

1. I presume that Elasticsearch might already use hashes of terms  
internally in the index, so would it be possible to get those?

2. If the above is not possible, what other options do I have to circumvent  
the 30-40 MB barrier?

--  
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/f9f8e5c0-7f01-4769-a584-223586cec3be%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f9f8e5c0-7f01-4769-a584-223586cec3be%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [December 14, 2014, 10:31pm UTC](https://discuss.elastic.co/t/creating-a-custom-plugin-to-return-hashes-of-the-terms-or-the-terms-of-an-elasticsearch-index/21236/2 "2014-12-14T22:31:53Z")

</div>

The termlist plugin can use filters with the 'term' parameter and  
pagination with the 'size' parameter. So you can get smaller term lists,  
for terms starting with 'a','b','c' ..., and you can limit the number of  
entries returned by say size=1000 (or 10000 etc) The 'term' filter should  
be sufficient for most cases.

There are no hashes for terms.

Jörg

On Fri, Dec 12, 2014 at 2:45 PM, Rosen Nikolov [rpnikolov@gmail.com](mailto:rpnikolov@gmail.com) wrote:

> I am currently using an Elasticsearch plugin called "termlist" (  
> [GitHub - jprante/elasticsearch-index-termlist: Elasticsearch Index Termlist](https://github.com/jprante/elasticsearch-index-termlist))  
> that returns the terms of an index. But it breaks when there are too many  
> terms and the output  
> information is larger than about 30-40 megabytes. I need my custom plugin  
> to work for bigger amounts of output data.
> 
> I am thinking about creating a custom plugin to return hashes of terms  
> instead of the actual terms to reduce the output data volume.
> 
> So I have a couple of questions:
> 
> 1. I presume that Elasticsearch might already use hashes of terms  
> internally in the index, so would it be possible to get those?
> 
> 2. If the above is not possible, what other options do I have to  
> circumvent the 30-40 MB barrier?
> 
> --  
> 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/f9f8e5c0-7f01-4769-a584-223586cec3be%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f9f8e5c0-7f01-4769-a584-223586cec3be%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/f9f8e5c0-7f01-4769-a584-223586cec3be%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/f9f8e5c0-7f01-4769-a584-223586cec3be%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CAKdsXoF6qYpkhOvxrPRTgYU%3D8def18h%2BjuA8jzgyzurGV9300Q%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoF6qYpkhOvxrPRTgYU%3D8def18h%2BjuA8jzgyzurGV9300Q%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Rosen\_Nikolov](https://avatars.discourse-cdn.com/v4/letter/r/ce73a5/32.png) [@Rosen\_Nikolov](https://discuss.elastic.co/u/Rosen_Nikolov)\
**Post date:** [December 15, 2014, 12:45pm UTC](https://discuss.elastic.co/t/creating-a-custom-plugin-to-return-hashes-of-the-terms-or-the-terms-of-an-elasticsearch-index/21236/3 "2014-12-15T12:45:32Z")

</div>

Thank you Jörg,

Very helpful.

On Monday, December 15, 2014 12:32:00 AM UTC+2, Jörg Prante wrote:

> The termlist plugin can use filters with the 'term' parameter and  
> pagination with the 'size' parameter. So you can get smaller term lists,  
> for terms starting with 'a','b','c' ..., and you can limit the number of  
> entries returned by say size=1000 (or 10000 etc) The 'term' filter should  
> be sufficient for most cases.
> 
> There are no hashes for terms.
> 
> Jörg
> 
> On Fri, Dec 12, 2014 at 2:45 PM, Rosen Nikolov \<[rpni...@gmail.com](mailto:rpni...@gmail.com)  
> \<javascript:\>\> wrote:
> 
> > I am currently using an Elasticsearch plugin called "termlist" (  
> > [GitHub - jprante/elasticsearch-index-termlist: Elasticsearch Index Termlist](https://github.com/jprante/elasticsearch-index-termlist))  
> > that returns the terms of an index. But it breaks when there are too many  
> > terms and the output  
> > information is larger than about 30-40 megabytes. I need my custom plugin  
> > to work for bigger amounts of output data.
> > 
> > I am thinking about creating a custom plugin to return hashes of terms  
> > instead of the actual terms to reduce the output data volume.
> > 
> > So I have a couple of questions:
> > 
> > 1. I presume that Elasticsearch might already use hashes of terms  
> > internally in the index, so would it be possible to get those?
> > 
> > 2. If the above is not possible, what other options do I have to  
> > circumvent the 30-40 MB barrier?
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/f9f8e5c0-7f01-4769-a584-223586cec3be%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f9f8e5c0-7f01-4769-a584-223586cec3be%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/f9f8e5c0-7f01-4769-a584-223586cec3be%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/f9f8e5c0-7f01-4769-a584-223586cec3be%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/df55b0f2-305b-4546-8d4d-8fd14e859e4a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/df55b0f2-305b-4546-8d4d-8fd14e859e4a%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:43am UTC](https://discuss.elastic.co/t/creating-a-custom-plugin-to-return-hashes-of-the-terms-or-the-terms-of-an-elasticsearch-index/21236/4 "2017-07-06T00:43:42Z")

</div>


