You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by rubdabadub <ru...@gmail.com> on 2007/02/06 00:22:25 UTC
Questions about facets?
Hi list:
I am trying to understand facets. I have read the wiki pages. Am I
correct to say
- A facet field must be defined xxx_facet?
- If I have the following data under xxx_facet i.e monitor, tv, plasma
tv, lcd tv .. will the facets will be (Thinking about the wiki
example)
<response>
....
<lst name="facet_counts">
<lst name="facet_queries"/>
<lst name="facet_fields">
<lst name="cat">
<int name="tv">1</int>
<int name="plasma tv">1</int>
<int name="lcd tv">1</int>
</lst>
....
</response>
or will it be
<int name="tv">3</int>.
I am trying to understand how facets gets counted i.e how the term
"tv" in the example is being treated? How can I treat "Plasma TV" as a
category?
Regards
Re: Questions about facets?
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
Just to clarify something that you mentioned for others... a facet
field name can be anything of your choosing. Solr itself does not
have any special naming conventions on any field.
But, I am establishing some field naming conventions for the Ruby
work in solrb/Flare with a customized schema. I'm still not sure how
these will evolve though.
Erik
On Feb 6, 2007, at 1:35 AM, rubdabadub wrote:
> Please ignore the questions. I have found my answer. One must use
> field type = string then it works. i.e. "plasma tv"
>
> Thanks.
>
> On 2/6/07, rubdabadub <ru...@gmail.com> wrote:
>> Hi list:
>>
>> I am trying to understand facets. I have read the wiki pages. Am I
>> correct to say
>>
>> - A facet field must be defined xxx_facet?
>> - If I have the following data under xxx_facet i.e monitor, tv,
>> plasma
>> tv, lcd tv .. will the facets will be (Thinking about the wiki
>> example)
>>
>> <response>
>> ....
>> <lst name="facet_counts">
>> <lst name="facet_queries"/>
>> <lst name="facet_fields">
>> <lst name="cat">
>> <int name="tv">1</int>
>> <int name="plasma tv">1</int>
>> <int name="lcd tv">1</int>
>> </lst>
>> ....
>> </response>
>> or will it be
>> <int name="tv">3</int>.
>>
>> I am trying to understand how facets gets counted i.e how the term
>> "tv" in the example is being treated? How can I treat "Plasma TV"
>> as a
>> category?
>>
>> Regards
>>
Re: Questions about facets?
Posted by rubdabadub <ru...@gmail.com>.
Please ignore the questions. I have found my answer. One must use
field type = string then it works. i.e. "plasma tv"
Thanks.
On 2/6/07, rubdabadub <ru...@gmail.com> wrote:
> Hi list:
>
> I am trying to understand facets. I have read the wiki pages. Am I
> correct to say
>
> - A facet field must be defined xxx_facet?
> - If I have the following data under xxx_facet i.e monitor, tv, plasma
> tv, lcd tv .. will the facets will be (Thinking about the wiki
> example)
>
> <response>
> ....
> <lst name="facet_counts">
> <lst name="facet_queries"/>
> <lst name="facet_fields">
> <lst name="cat">
> <int name="tv">1</int>
> <int name="plasma tv">1</int>
> <int name="lcd tv">1</int>
> </lst>
> ....
> </response>
> or will it be
> <int name="tv">3</int>.
>
> I am trying to understand how facets gets counted i.e how the term
> "tv" in the example is being treated? How can I treat "Plasma TV" as a
> category?
>
> Regards
>