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 Nasseam Elkarra <na...@bodukai.com> on 2009/04/14 22:52:27 UTC

Hierarchal Faceting Field Type

Background:
Set up a system for hierarchal categories using the following scheme:
level one#
level one#level two#
level one#level two#level three#

Trying to find the right combination of field type and query to get  
the desired results. Saw some previous posts about hierarchal facets  
which helped in the generating the right query but having an issue  
using the built in text field which ignores our delimiter and the  
string field which prevents us from doing a start with search. Does  
anyone have any insight into the field declaration?

Any help is appreciated. Thank you.

Re: Hierarchal Faceting Field Type

Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Mon, May 4, 2009 at 5:28 PM, Nasseam Elkarra <na...@bodukai.com> wrote:
> Hello Koji,
>
> I applied the patch:
> http://issues.apache.org/jira/browse/SOLR-64
>
> It's working but I have a question about facet.prefix. When we add a
> facet.prefix it filters the facet results but not the query results.  Is
> there a way to filter both?

Use a normal filter (fq parameter) instead of facet.prefix.

-Yonik
http://www.lucidimagination.com

Re: Hierarchal Faceting Field Type

Posted by Nasseam Elkarra <na...@bodukai.com>.
Hello Koji,

I applied the patch:
http://issues.apache.org/jira/browse/SOLR-64

It's working but I have a question about facet.prefix. When we add a  
facet.prefix it filters the facet results but not the query results.   
Is there a way to filter both?

Thank you,
Nasseam

On Apr 14, 2009, at 3:32 PM, Koji Sekiguchi wrote:

> Nasseam Elkarra wrote:
>> Background:
>> Set up a system for hierarchal categories using the following scheme:
>> level one#
>> level one#level two#
>> level one#level two#level three#
>>
>> Trying to find the right combination of field type and query to get  
>> the desired results. Saw some previous posts about hierarchal  
>> facets which helped in the generating the right query but having an  
>> issue using the built in text field which ignores our delimiter and  
>> the string field which prevents us from doing a start with search.  
>> Does anyone have any insight into the field declaration?
>>
>> Any help is appreciated. Thank you.
>>
>
> Out of need in my project, I'll get started to work for SOLR-64,  
> expected any day.
> I'm thinking introducing a field type for hierarchical facet.
>
> Koji
>
>


Re: Hierarchal Faceting Field Type

Posted by Koji Sekiguchi <ko...@r.email.ne.jp>.
Nasseam Elkarra wrote:
> Background:
> Set up a system for hierarchal categories using the following scheme:
> level one#
> level one#level two#
> level one#level two#level three#
>
> Trying to find the right combination of field type and query to get 
> the desired results. Saw some previous posts about hierarchal facets 
> which helped in the generating the right query but having an issue 
> using the built in text field which ignores our delimiter and the 
> string field which prevents us from doing a start with search. Does 
> anyone have any insight into the field declaration?
>
> Any help is appreciated. Thank you.
>

Out of need in my project, I'll get started to work for SOLR-64, 
expected any day.
I'm thinking introducing a field type for hierarchical facet.

Koji



Re: Hierarchal Faceting Field Type

Posted by Nasseam Elkarra <na...@bodukai.com>.
Thank you. We tried your suggestion but we are still getting the  
following problem:

<fieldType name="category" class="solr.TextField">
	<analyzer type="store">
        	<tokenizer class="solr.PatternTokenizerFactory" pattern=";"/>
   	</analyzer>
</fieldType>

<field name="my_facet" type="category" indexed="true" stored="false"  
multiValued="true"/>

Sample data:
level one;level two;level three;
level one;level two;level threeB;

When we query for:
level one;level two;level three;*

We are getting back :
level one;level two;level threeB;

Even though the B is before the semicolon. Any idea why?

Thank you,
Nasseam

Check out our solr-powered Ajax search+nav solution:
http://factbook.bodukai.com/

Powered by Boutique:
http://bodukai.com/boutique/

On Apr 17, 2009, at 3:10 PM, Chris Hostetter wrote:

>
> : level one#
> : level one#level two#
> : level one#level two#level three#
> :
> : Trying to find the right combination of field type and query to  
> get the
> : desired results. Saw some previous posts about hierarchal facets  
> which helped
> : in the generating the right query but having an issue using the  
> built in text
> : field which ignores our delimiter and the string field which  
> prevents us from
> : doing a start with search. Does anyone have any insight into the  
> field
> : declaration?
>
> Use TextField, with a PatternTokenizer
>
> BTW: if this isn't thread you've already seen, it's handy to know  
> about...
>
> http://www.nabble.com/Hierarchical-Faceting-to20090898.html#a20176326
>
>
> -Hoss
>


Re: Hierarchal Faceting Field Type

Posted by Chris Hostetter <ho...@fucit.org>.
: level one#
: level one#level two#
: level one#level two#level three#
: 
: Trying to find the right combination of field type and query to get the
: desired results. Saw some previous posts about hierarchal facets which helped
: in the generating the right query but having an issue using the built in text
: field which ignores our delimiter and the string field which prevents us from
: doing a start with search. Does anyone have any insight into the field
: declaration?

Use TextField, with a PatternTokenizer

BTW: if this isn't thread you've already seen, it's handy to know about...

http://www.nabble.com/Hierarchical-Faceting-to20090898.html#a20176326


-Hoss