# Facets on everything

**URL:** <https://discuss.elastic.co/t/facets-on-everything/13399>\
**Category:** Elasticsearch\
**Created:** [August 29, 2013, 7:44pm UTC](https://discuss.elastic.co/t/facets-on-everything/13399 "2013-08-29T19:44:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexis\_Okuwa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexis_okuwa/32/1983_2.png) [@Alexis\_Okuwa](https://discuss.elastic.co/u/Alexis_Okuwa)\
**Post date:** [August 29, 2013, 7:44pm UTC](https://discuss.elastic.co/t/facets-on-everything/13399/1 "2013-08-29T19:44:02Z")

</div>

I am familur with facets and making them work but I would really like some  
sort of magical facet that would facet everything. What I mean is that  
facets require me to supply what feilds i want a facet on. Where as I want  
to supply some sort of range between time A and Time C or any sort of way  
of filtering documents and then for the facets to figure it out for its  
self. So if the field is a type of number it should use a statistical and  
if its a string then to use a term facet. My documents are very dynamic  
with nesting and so on this would really help for data aggregation and so  
on.

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Alexis\_Okuwa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexis_okuwa/32/1983_2.png) [@Alexis\_Okuwa](https://discuss.elastic.co/u/Alexis_Okuwa)\
**Post date:** [August 29, 2013, 7:56pm UTC](https://discuss.elastic.co/t/facets-on-everything/13399/2 "2013-08-29T19:56:04Z")

</div>

This post that i found on stack overflow explains what am looking for.

> <https://stackoverflow.com/questions/16341134/creating-dynamic-facets-in-elasticsearch>

On Thu, Aug 29, 2013 at 12:44 PM, Alexis Okuwa [wojonstech@gmail.com](mailto:wojonstech@gmail.com) wrote:

> I am familur with facets and making them work but I would really like some  
> sort of magical facet that would facet everything. What I mean is that  
> facets require me to supply what feilds i want a facet on. Where as I want  
> to supply some sort of range between time A and Time C or any sort of way  
> of filtering documents and then for the facets to figure it out for its  
> self. So if the field is a type of number it should use a statistical and  
> if its a string then to use a term facet. My documents are very dynamic  
> with nesting and so on this would really help for data aggregation and so  
> on.
> 
> --  
> You received this message because you are subscribed to a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/I4rwi3UmTXE/unsubscribe](https://groups.google.com/d/topic/elasticsearch/I4rwi3UmTXE/unsubscribe).  
> To unsubscribe from this group and all its topics, send an email to  
> [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
Enjoy,  
Alexis Okuwa  
WojonsTech  
424.835.1223

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Maciej\_Dziardziel](https://avatars.discourse-cdn.com/v4/letter/m/d9b06d/32.png) [@Maciej\_Dziardziel](https://discuss.elastic.co/u/Maciej_Dziardziel)\
**Post date:** [August 29, 2013, 8:07pm UTC](https://discuss.elastic.co/t/facets-on-everything/13399/3 "2013-08-29T20:07:47Z")

</div>

One way to achieve it would be to keep a mapping of attributes and values  
to ids separately ((color, red) -\> 1, (color, green)-\>2, (type, usb)-\>3),  
have a field with ids in document and facet on this.

On Thursday, August 29, 2013 8:56:04 PM UTC+1, Alexis Okuwa wrote:

> This post that i found on stack overflow explains what am looking for.
> 
> [Creating Dynamic Facets in Elasticsearch - Stack Overflow](http://stackoverflow.com/questions/16341134/creating-dynamic-facets-in-elasticsearch)
> 
> On Thu, Aug 29, 2013 at 12:44 PM, Alexis Okuwa \<[wojon...@gmail.com](mailto:wojon...@gmail.com)\<javascript:\>
> 
> > wrote:
> 
> > I am familur with facets and making them work but I would really like  
> > some sort of magical facet that would facet everything. What I mean is that  
> > facets require me to supply what feilds i want a facet on. Where as I want  
> > to supply some sort of range between time A and Time C or any sort of way  
> > of filtering documents and then for the facets to figure it out for its  
> > self. So if the field is a type of number it should use a statistical and  
> > if its a string then to use a term facet. My documents are very dynamic  
> > with nesting and so on this would really help for data aggregation and so  
> > on.
> > 
> > --  
> > You received this message because you are subscribed to a topic in the  
> > Google Groups "elasticsearch" group.  
> > To unsubscribe from this topic, visit  
> > [https://groups.google.com/d/topic/elasticsearch/I4rwi3UmTXE/unsubscribe](https://groups.google.com/d/topic/elasticsearch/I4rwi3UmTXE/unsubscribe).  
> > To unsubscribe from this group and all its topics, send an email to  
> > [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> Enjoy,  
> Alexis Okuwa  
> WojonsTech  
> 424.835.1223

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Alexis\_Okuwa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexis_okuwa/32/1983_2.png) [@Alexis\_Okuwa](https://discuss.elastic.co/u/Alexis_Okuwa)\
**Post date:** [August 29, 2013, 9:05pm UTC](https://discuss.elastic.co/t/facets-on-everything/13399/4 "2013-08-29T21:05:58Z")

</div>

The issue that I have is in most cases that will my code is a multi tenant  
environment so for example i have the paths to drives and nics which are  
named by the user so the mapping will get pretty large.

On Thursday, August 29, 2013 12:44:02 PM UTC-7, Alexis Okuwa wrote:

> I am familur with facets and making them work but I would really like some  
> sort of magical facet that would facet everything. What I mean is that  
> facets require me to supply what feilds i want a facet on. Where as I want  
> to supply some sort of range between time A and Time C or any sort of way  
> of filtering documents and then for the facets to figure it out for its  
> self. So if the field is a type of number it should use a statistical and  
> if its a string then to use a term facet. My documents are very dynamic  
> with nesting and so on this would really help for data aggregation and so  
> on.

--  
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).  
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, 2:18am UTC](https://discuss.elastic.co/t/facets-on-everything/13399/5 "2017-07-06T02:18:54Z")

</div>


