# Supporting facets on fields at index time in elastic search

**URL:** <https://discuss.elastic.co/t/supporting-facets-on-fields-at-index-time-in-elastic-search/12928>\
**Category:** Elasticsearch\
**Created:** [July 25, 2013, 6:11am UTC](https://discuss.elastic.co/t/supporting-facets-on-fields-at-index-time-in-elastic-search/12928 "2013-07-25T06:11:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pmanvi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pmanvi/32/46188_2.png) [@pmanvi](https://discuss.elastic.co/u/pmanvi)\
**Post date:** [July 25, 2013, 6:11am UTC](https://discuss.elastic.co/t/supporting-facets-on-fields-at-index-time-in-elastic-search/12928/1 "2013-07-25T06:11:48Z")

</div>

Lucene's facet module does most of its work at indexing time, its performant. I think as of now there is no way to specify the faceting information @ the index time in elasticsearch. Its all dynamic.

Choosing arbitrary fields for faceting can slow down the system, it forces us to have validation to make sure that only specified fields are used for faceting. If there is anyway to stop this it would have been great.There should be some way to stop faceting on certain fields at the elasticsearch level configuration.

Since with 0.90.2, elasticsearch uses lucene4.x version. Is there any plan to support this @ index time?

---

<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:** [July 26, 2013, 3:24pm UTC](https://discuss.elastic.co/t/supporting-facets-on-fields-at-index-time-in-elastic-search/12928/2 "2013-07-26T15:24:06Z")

</div>

Not even Solr uses Lucene faceting framework. Just like elasticsearch, Solr  
uses the field data. Considering the upcoming aggregation framework, it  
appears there is no intention of using Lucene's faceting. I have not  
looked, but the change might be too low-level for it to be supported by a  
plugin (if someone wanted to take on the challenge).

--  
Ivan

On Wed, Jul 24, 2013 at 11:11 PM, pmanvi [praveena.manvi@gmail.com](mailto:praveena.manvi@gmail.com) wrote:

> Lucene's facet module does most of its work at indexing time, its  
> performant. I think as of now there is no way to specify the faceting  
> information @ the index time in elasticsearch. Its all dynamic.
> 
> Choosing arbitrary fields for faceting can slow down the system, it forces  
> us to have validation to make sure that only specified fields are used for  
> faceting. If there is anyway to stop this it would have been great.There  
> should be some way to stop faceting on certain fields at the elasticsearch  
> level configuration.
> 
> Since with 0.90.2, elasticsearch uses lucene4.x version. Is there any plan  
> to support this @ index time?
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/Supporting-facets-on-fields-at-index-time-in-elastic-search-tp4038620.html](http://elasticsearch-users.115913.n3.nabble.com/Supporting-facets-on-fields-at-index-time-in-elastic-search-tp4038620.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).  
> 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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![pmanvi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pmanvi/32/46188_2.png) [@pmanvi](https://discuss.elastic.co/u/pmanvi)\
**Post date:** [July 27, 2013, 3:11pm UTC](https://discuss.elastic.co/t/supporting-facets-on-fields-at-index-time-in-elastic-search/12928/3 "2013-07-27T15:11:53Z")

</div>

Thanks for the response.

The applications that we will be supporting will be heavy on the usage of faceting. Elasticsearch being core search module, we want to make full use of lucene static faceting feature (defined during the index time).  
Anyway will keep tab on the new aggregation feature.

Ref:

> **[Dynamic faceting with Lucene](http://blog.mikemccandless.com/2013/05/dynamic-faceting-with-lucene.html)**
>
> Lucene's facet module has seen some great improvements recently: sizable (nearly 4X) speedups and new features like DrillSideways . The Jira...

  
"price for that flexibility is slower searching" - we don;t know how much slower it would be for our use case, will experiment more on this.

---

<div class="post-metadata">

**Author:** ![pmanvi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pmanvi/32/46188_2.png) [@pmanvi](https://discuss.elastic.co/u/pmanvi)\
**Post date:** [August 16, 2013, 9:18pm UTC](https://discuss.elastic.co/t/supporting-facets-on-fields-at-index-time-in-elastic-search/12928/4 "2013-08-16T21:18:05Z")

</div>

This feature looks to be very popular feature request. [https://github.com/elasticsearch/elasticsearch/issues/256](https://github.com/elasticsearch/elasticsearch/issues/256)

Unfortunately, awesome ES team has other priority to work as I noted from the above thread.

"Don't hold your breath waiting on Field Collapsing. It won't be part of the 0.90 final. The ES team has to do a substantial refactoring before they will be able to implement this feature in a satisfying way. Probably the best course of action is to implement your own, client-side, or investigate if you can accomplish the same goals using a Parent-Child design."  
[http://www.elasticsearch.org/guide/reference/query-dsl/top-children-query/](http://www.elasticsearch.org/guide/reference/query-dsl/top-children-query/)

---

<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:20am UTC](https://discuss.elastic.co/t/supporting-facets-on-fields-at-index-time-in-elastic-search/12928/5 "2017-07-06T02:20:47Z")

</div>

Closed on July 6, 2017, 2:20am UTC


