You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Yevgeniy Belman <ys...@gmail.com> on 2009/01/07 03:13:30 UTC

RE: Solr FAQ entry about "Dynamically calculated range facet" topic

So did anyone put together a FAQ on this subject? I am also interested in
seeing the different ways to get dynamic faceting to work.

In this post, Chris Hostetter dropped a piece of handler code. Is it still
the right path to take for those generated ranges:
$0..$20 (3)
$20..$75 (15)
$75..$123 (8)

"Re: Dynamically calculated range facet"
http://www.mail-archive.com/solr-user@lucene.apache.org/msg04727.html

RE: Solr FAQ entry about "Dynamically calculated range facet" topic

Posted by Chris Hostetter <ho...@fucit.org>.
: So did anyone put together a FAQ on this subject? I am also interested in
: seeing the different ways to get dynamic faceting to work.

in past discussions own of the big pre-reqs for doing anything interesting 
was generating stats accross the field ... the new StatsComponent can give 
you the min/mean/max/stddev for any field, so you can now make rough 
guesses at some good ranges on the client and then request them.

: In this post, Chris Hostetter dropped a piece of handler code. Is it still
: the right path to take for those generated ranges:
: $0..$20 (3)
: $20..$75 (15)
: $75..$123 (8)
: 
: "Re: Dynamically calculated range facet"
: http://www.mail-archive.com/solr-user@lucene.apache.org/msg04727.html

these days you'd want to do this in a SearchComponent ... 
probabably a subclass of FacetComponent ... but the same basic pattern 
still applies.  you're going to have a DocSet to work with, and you can do 
whatever you want ot generate your facet metadata.

the really interesting part would be getting 
SearchComponent.distributedProcess to work, because individual shards 
aren'tneccessarily going to pick the same rnages based on their local 
stats ... i guess you'd make your new Component depend on the 
StatsComponent completing and then have the coordinator compute the ranges 
and tell the shards what they should be, then aggregate ... that seems 
like it might work.




-Hoss