Awesome, thanks that works.
From: "Yonik Seeley" <[EMAIL PROTECTED]>
Reply-To: solr-user@lucene.apache.org
To: solr-user@lucene.apache.org
Subject: Re: Faceted search glitch???
Date: Fri, 9 Feb 2007 16:28:05 -0500
On 2/9/07, Peter McPeterson <[EMAIL PROTECTED]> wrote:
On Solr, I'm indexing a facet field which contains different values on
each
record (of course) but it doesn't seem to be working the way I had
expected.
For instance:
When looking for:
http://localhost:8983/solr/select/?q=sales&facet=true&facet.field=education_facet
it returns the facet:
'education_facet'=>{
'Bachelor'=>20,
'Associate'=>35,
'Doctorate'=>1,
'High School'=>150,
'Law Degree'=>0,
'Master'=>0}
but when I modify my query to look for High School:
http://localhost:8983/solr/select/?q=sales+AND+education_facet:High+School&facet=true&facet.field=education_facet
it returns nothing. But when I use single-word fields such as Bachelor or
Associate it works fine.
education_facet:High+School
Is parsed by the lucene query parser as
education_facet:High OR default_field:School
Surround it by quotes to make it a single term.
Also, for efficiency, you should put the filter in an fq param:
http://localhost:8983/solr/select/?q=sales&fq=education_facet:"High
School"&facet=true&facet.field=education_facet
-Yonik
_________________________________________________________________
Turn searches into helpful donations. Make your search count.
http://click4thecause.live.com/search/charity/default.aspx?source=hmemtagline_donation&FORM=WLMTAG