Re: Query faceting

2009-06-08 Thread Jay Hill
In order to get the the values you want for the service field you will need
to change the fieldType definition in schema.xml for "service" to use
something that doesn't alter your original values. Try the "string"
fieldType to start and look at the fieldType definition for "string". I'm
guessing you have it set to "text" or something else with a chain of filters
during analysis.

If you don't want back facets with a count of 0 set this param:
&facet.mincount=1  Have a look at all the values you can set on facets:
http://wiki.apache.org/solr/SimpleFacetParameters

-Jay

On Mon, Jun 8, 2009 at 2:09 PM, siping liu  wrote:

>
> Hi,
>
> I have a field called "service" with following values:
>
> - Shuttle Services
> - Senior Discounts
> - Laundry Rooms
>
> - ...
>
>
>
> When I conduct query with "facet=true&facet.field=service&facet.limit=-1",
> I get something like this back:
>
> - shuttle 2
>
> - service 3
>
> - senior 0
>
> - laundry 0
>
> - room 3
>
> - ...
>
>
>
> Questions:
>
> - How not to break up fields values in words, so I can get something like
> "Shuttle Services 2" back?
>
> - How to tell Solr not to return facet with 0 value? The query takes long
> time to finish, seemingly because of the long list of items with 0 count.
>
>
>
> thanks for any advice.
>
> _
> Insert movie times and more without leaving HotmailĀ®.
>
> http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009
>


Query faceting

2009-06-08 Thread siping liu

Hi,

I have a field called "service" with following values:

- Shuttle Services
- Senior Discounts
- Laundry Rooms

- ...

 

When I conduct query with "facet=true&facet.field=service&facet.limit=-1", I 
get something like this back:

- shuttle 2

- service 3

- senior 0

- laundry 0

- room 3

- ...

 

Questions:

- How not to break up fields values in words, so I can get something like 
"Shuttle Services 2" back?

- How to tell Solr not to return facet with 0 value? The query takes long time 
to finish, seemingly because of the long list of items with 0 count.

 

thanks for any advice.

_
Insert movie times and more without leaving HotmailĀ®. 
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009