# Facets vs aggregations from lucene context

**URL:** <https://discuss.elastic.co/t/facets-vs-aggregations-from-lucene-context/638>\
**Category:** Elasticsearch\
**Created:** [May 13, 2015, 4:09pm UTC](https://discuss.elastic.co/t/facets-vs-aggregations-from-lucene-context/638 "2015-05-13T16:09:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jason\_Wee](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@Jason\_Wee](https://discuss.elastic.co/u/Jason_Wee)\
**Post date:** [May 13, 2015, 4:09pm UTC](https://discuss.elastic.co/t/facets-vs-aggregations-from-lucene-context/638/1 "2015-05-13T16:09:40Z")

</div>

Hi elasticsearch, is there a difference between facets vs aggregation from lucene context? I like to read more about this technically if there is any documentation given.

Thank you.

Jason

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 13, 2015, 10:50pm UTC](https://discuss.elastic.co/t/facets-vs-aggregations-from-lucene-context/638/2 "2015-05-13T22:50:50Z")

</div>

You can read more on facets [here](http://www.elastic.co/guide/en/elasticsearch/reference/current/search-facets.html) and aggregations [here](http://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations.html).

Here's an overview though

```
Aggregations grew out of the facets module and the long experience of how users use it (and would like to use it) for real-time data analytics purposes. As such, it serves as the next generation replacement for the functionality we currently refer to as "faceting".

Facets provide a great way to aggregate data within a document set context. This context is defined by the executed query in combination with the different levels of filters that can be defined (filtered queries, top-level filters, and facet level filters). While powerful, their implementation is not designed from the ground up to support complex aggregations and is thus limited.
```

---

<div class="post-metadata">

**Author:** ![Jason\_Wee](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@Jason\_Wee](https://discuss.elastic.co/u/Jason_Wee)\
**Post date:** [May 16, 2015, 7:02pm UTC](https://discuss.elastic.co/t/facets-vs-aggregations-from-lucene-context/638/3 "2015-05-16T19:02:07Z")

</div>

okay, thank you. let's read into the code of aggregation to see how es call to the lucene library.

---

<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:13am UTC](https://discuss.elastic.co/t/facets-vs-aggregations-from-lucene-context/638/4 "2017-07-06T00:13:43Z")

</div>


