# Facets with scores

**URL:** <https://discuss.elastic.co/t/facets-with-scores/10125>\
**Category:** Elasticsearch\
**Created:** [December 19, 2012, 8:22pm UTC](https://discuss.elastic.co/t/facets-with-scores/10125 "2012-12-19T20:22:31Z")\
**Posts on this page:** 4\
**Page:** 1

<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 19, 2012, 8:22pm UTC](https://discuss.elastic.co/t/facets-with-scores/10125/1 "2012-12-19T20:22:31Z")

</div>

In the past, I have used Lucene collectors that calculated the  
average/max score for each facet entry. Would like to replicate this logic  
in ElasticSearch. My preference is to implement all custom code as plugins  
since I do not want to maintain my own branch, but the facet infrastructure  
is a bit complex and a re-working was said to be planned.

It should be easier to extend the existing code than it would be to create  
a new facet type. Would such a feature be useful for the community in  
general? Would only consider it if there would be a chance it can be merged  
into the main branch.

--

---

<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 20, 2012, 1:14am UTC](https://discuss.elastic.co/t/facets-with-scores/10125/2 "2012-12-20T01:14:57Z")

</div>

Hi Ivan,

I have also pull requests open on facet terms sorted by collators, waiting  
for the pluggable facet API re-work. In the meantime, the move to Lucene 4  
is of higher priority. I feel it is worth to add pull requests to mainline,  
so it is easy for the Elasticsearch team to track all the suggestions and  
get a picture of the whole story.

Jörg

On Wednesday, December 19, 2012 9:22:31 PM UTC+1, Ivan Brusic wrote:

> In the past, I have used Lucene collectors that calculated the  
> average/max score for each facet entry. Would like to replicate this logic  
> in Elasticsearch. My preference is to implement all custom code as plugins  
> since I do not want to maintain my own branch, but the facet infrastructure  
> is a bit complex and a re-working was said to be planned.
> 
> It should be easier to extend the existing code than it would be to create  
> a new facet type. Would such a feature be useful for the community in  
> general? Would only consider it if there would be a chance it can be merged  
> into the main branch.

--

---

<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 20, 2012, 6:17pm UTC](https://discuss.elastic.co/t/facets-with-scores/10125/3 "2012-12-20T18:17:34Z")

</div>

A pull request only makes sense if the feature would be used by the  
community. I might start off by creating a plugin for one particular facet  
(int terms) and see how that works.

--  
Ivan

On Wed, Dec 19, 2012 at 5:14 PM, Jörg Prante [joergprante@gmail.com](mailto:joergprante@gmail.com) wrote:

> Hi Ivan,
> 
> I have also pull requests open on facet terms sorted by collators, waiting  
> for the pluggable facet API re-work. In the meantime, the move to Lucene 4  
> is of higher priority. I feel it is worth to add pull requests to mainline,  
> so it is easy for the Elasticsearch team to track all the suggestions and  
> get a picture of the whole story.
> 
> Jörg
> 
> On Wednesday, December 19, 2012 9:22:31 PM UTC+1, Ivan Brusic wrote:
> 
> > In the past, I have used Lucene collectors that calculated the  
> > average/max score for each facet entry. Would like to replicate this logic  
> > in Elasticsearch. My preference is to implement all custom code as plugins  
> > since I do not want to maintain my own branch, but the facet infrastructure  
> > is a bit complex and a re-working was said to be planned.
> > 
> > It should be easier to extend the existing code than it would be to  
> > create a new facet type. Would such a feature be useful for the community  
> > in general? Would only consider it if there would be a chance it can be  
> > merged into the main branch.
> 
> --

--

---

<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:59am UTC](https://discuss.elastic.co/t/facets-with-scores/10125/4 "2017-07-06T02:59:04Z")

</div>


