lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject RE: Solr FAQ entry about "Dynamically calculated range facet" topic
Date Thu, 15 Jan 2009 23:44:50 GMT

: 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


Mime
View raw message