You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Satheesh Akkinepally <sa...@gmail.com> on 2018/07/18 22:05:48 UTC
Custom Solr Facet Sort
I posted this in solr-user group but perhaps, this is the right group to
ask questions on internals of solr?
Hello all,
If I want to plug in my own sorting for facets, what would be the best
approach. I know, out of the box, solr supports sort by facet count and
sort by alpha. I want to plug in my own sorting (say by relevancy). Is
there a way to do that? Where should I start with if I need to write a
Custom Facet Component?
Basically I want to plug the scores calculated in earlier steps for the
documents matched, do some kind of aggregation of the scores of the
documents that fall under a facet and use this aggregate score to rank the
facets than doing the facet ranking based on counts. I am assuming this is
something possible. Just looking for some guidance as to where to start with
Appreciate the responses from the community
Thanks
Re: Custom Solr Facet Sort
Posted by Jan Høydahl <ja...@cominvent.com>.
Hi
Have you investigated JSON Facets, they can be sorted by a function, perhaps that helps solve your use case?
https://lucene.apache.org/solr/guide/7_3/json-facet-api.html#FacetSorting <https://lucene.apache.org/solr/guide/7_3/json-facet-api.html#FacetSorting>
--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com
> 19. jul. 2018 kl. 00:05 skrev Satheesh Akkinepally <sa...@gmail.com>:
>
> I posted this in solr-user group but perhaps, this is the right group to ask questions on internals of solr?
>
> Hello all,
> If I want to plug in my own sorting for facets, what would be the best approach. I know, out of the box, solr supports sort by facet count and sort by alpha. I want to plug in my own sorting (say by relevancy). Is there a way to do that? Where should I start with if I need to write a Custom Facet Component?
> Basically I want to plug the scores calculated in earlier steps for the documents matched, do some kind of aggregation of the scores of the documents that fall under a facet and use this aggregate score to rank the facets than doing the facet ranking based on counts. I am assuming this is something possible. Just looking for some guidance as to where to start with
>
> Appreciate the responses from the community
>
> Thanks
>