Erik, thanks for the reply.

Creating ranges and doing stuff like your example is pretty much what I need and its an awesome feature. But I thought Solr would actually return a formatted string like "1980 - 1989 (count)" or "1980 TO 1980 (count)", as based on your example (.. &fq=year:[1980 TO 1989]&fq=year:[1990 TO 1999]... ).

How would you display those formatted strings without having to "hard code" them on a page? Because that's what I'm doing after I process the xml (getting just the count of each faceted query string, putting them into an array and doing like "1980 - 1989 ("+array[0]+")", "1980 - 1989 ("+array[1]+")" and so forth) and I don't think its the best way.

Thanks.

Peter


From: Erik Hatcher <[EMAIL PROTECTED]>
Reply-To: solr-user@lucene.apache.org
To: solr-user@lucene.apache.org
Subject: Re: facet.query question
Date: Thu, 1 Feb 2007 21:19:08 -0500


On Feb 1, 2007, at 7:55 PM, Peter McPeterson wrote:
Well, I think I figured it out. It can be used to display count results of different facet queries.

But is it all that it does?

Yes. This allows for dynamic "facets" based on run-time queries rather than an upfront indexed (and often untokenized) field. Suppose you index years, but want to display facets based on ranges such as decades... &fq=year:[1980 TO 1989]&fq=year:[1990 TO 1999]... and you'd get decade facet counts.

Pretty cool stuff, actually.

What are your faceting needs? What differential do you have with what Solr provides?

        Erik



Peter


From: "Peter McPeterson" <[EMAIL PROTECTED]>
Reply-To: solr-user@lucene.apache.org
To: solr-user@lucene.apache.org
Subject: facet.query question
Date: Thu, 01 Feb 2007 15:10:34 -0800

Hi all,

I'm working with faceted search but I can't seem to get the 'facet.query' option. I already read the wiki but still don't understand exactly what it does. Could someone please explain me:

- What does it do and how to use it

- Why should I use it?

- Why shouldn't I use it?


Thanks a lot.

Peter

_________________________________________________________________
Check out all that glitters with the MSN Entertainment Guide to the Academy Awards® http://movies.msn.com/movies/oscars2007/? icid=ncoscartagline2


_________________________________________________________________
FREE online classifieds from Windows Live Expo – buy and sell with people you know http://clk.atdmt.com/MSN/go/msnnkwex0010000001msn/ direct/01/?href=http://expo.live.com?s_cid=Hotmail_tagline_12/06


_________________________________________________________________
Laugh, share and connect with Windows Live Messenger http://clk.atdmt.com/MSN/go/msnnkwme0020000001msn/direct/01/?href=http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=hmtagline

Reply via email to