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 Phil Rosen <pr...@optaros.com> on 2007/01/11 00:55:53 UTC

confused with faceting and tokenizer

Im not sure if my issue is with tokenizer or worddeliminator but here is
my problem. I have a multi value field called "styles". 

 

Given the values: style1, style2, style3 when I ask for facets on style I
get back:

 

<int name="1">1</int>

<int name="2">1</int>

<int name="3">1</int>

<int name="style">1</int>

 

When what I would want is:

<int name="style1">1</int>

<int name="style2">1</int>

<int name="style3">1</int>

 

 

Do I need to change my tokenizer for "text" fields or "query"? Or is it a
worddeliminator issue?

 

Thanks in advance!

Phill

 

 


Re: confused with faceting and tokenizer

Posted by Mike Klaas <mi...@gmail.com>.
On 1/10/07, Phil Rosen <pr...@optaros.com> wrote:
> Follow up on that.
>
> Say I have a field productNumber with value: hs-100313189
>
> What tokenizer would I want to mach on a query for 100313189?

A WordDelimiterFilter with generateNumParts=true would work.  But you
shouldn't use this field for faceting in that case (copy it to another
field).

-Mike

RE: confused with faceting and tokenizer

Posted by Phil Rosen <pr...@optaros.com>.
Follow up on that.

Say I have a field productNumber with value: hs-100313189

What tokenizer would I want to mach on a query for 100313189?

-----Original Message-----
From: Mike Klaas [mailto:mike.klaas@gmail.com] 
Sent: Wednesday, January 10, 2007 7:13 PM
To: solr-user@lucene.apache.org
Subject: Re: confused with faceting and tokenizer

On 1/10/07, Phil Rosen <pr...@optaros.com> wrote:
> Do I need to change my tokenizer for "text" fields or "query"? Or is it a
> worddeliminator issue?

Ideally, _no_ tokenization should occur for fields on which you wish
to facet.  You can declare the field to be multivalued and still add
many non-tokenized values.

cheers,
-MIke


Re: confused with faceting and tokenizer

Posted by Mike Klaas <mi...@gmail.com>.
On 1/10/07, Phil Rosen <pr...@optaros.com> wrote:
> Do I need to change my tokenizer for "text" fields or "query"? Or is it a
> worddeliminator issue?

Ideally, _no_ tokenization should occur for fields on which you wish
to facet.  You can declare the field to be multivalued and still add
many non-tokenized values.

cheers,
-MIke