lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter McPeterson" <>
Subject Re: facet.query question
Date Fri, 02 Feb 2007 02:34:38 GMT
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.



>From: Erik Hatcher <>
>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
>>>From: "Peter McPeterson" <>
>>>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.
>>>Check out all that glitters with the MSN Entertainment Guide to  the 
>>>Academy Awards® 
>>FREE online classifieds from Windows Live Expo – buy and sell with  people 
>>you know 

Laugh, share and connect with Windows Live Messenger

View raw message