lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <erik.hatc...@gmail.com>
Subject Re: Using stored terms for faceting
Date Fri, 16 Jul 2010 09:05:40 GMT
This is simple faceting, doesn't even have to be a multi-valued  
field.  Just index your description field with the desired stop word  
removal and other analysis that you want done, and  
&facet.field=description

	Erik


On Jul 15, 2010, at 3:26 AM, Peter Karich wrote:

> Dear Hoss,
>
> I will try to clarify what I want to achieve :-)
>
> Assume I have the following three docs:
>
> id:1
> description: bmx bike 123
>
> id:2
> description: bmx bike 321
>
> id:3
> description: a mountain bike
>
> If I query against *:* I want to get the facets and its document  
> count ala:
> bike: 3
> bmx: 2
>
> I reached this with the following approach:
> I skip the noise words like 'a'. E.g. for doc 3 I will get the terms
> 'mountain' and 'bike'.
> Those two terms will then additionally indexed to a multivalued e.g.
> myfacet so that I can do faceting on that field.
>
> Is there a simpler approach?
>
> Regards,
> Peter.
>
>> : is it possible to use the stored terms of a field for a faceted  
>> search?
>>
>> No, the only thing stored fields can be used for is document centric
>> opterations (ie: once you have a small set of individual docIds,  
>> you can
>> access the stored fields to return to the user, or highlight, etc...)
>>
>> : I mean, I don't want to get the term frequency per document as it  
>> is
>> : shown here:
>> : http://wiki.apache.org/solr/TermVectorComponentExampleOptions
>> :
>> : I want to get the frequency of the term of my special search and  
>> show
>> : only the 10 most frequent terms and all the nice things that I  
>> can do
>> : for faceting.
>>
>> i honestly have no idea what you are saying you want -- can you  
>> provide
>> a concrete use case explaining what you mean?  describe some  
>> example data
>> and then explain what type of logic owuld happen and what type of  
>> result
>> you'd get back?
>>
>>
>>
>> -Hoss
>>
>>
>>
>
>
> -- 
> http://karussell.wordpress.com/
>


Mime
View raw message