lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kristen Roth" <kristen.r...@molecular.com>
Subject RE: Can you parse the contents of a field to populate other fields?
Date Wed, 07 Nov 2007 20:15:39 GMT
So, I think I have things set up correctly in my schema, but it doesn't
appear that any logic is being applied to my Category_# fields - they
are being populated with the full string copied from the Category field
(facet1::facet2::facet3...facetn) instead of just facet1, facet2, etc.

I have several different field types, each with a different regex to
match a specific part of the input string.  In this example, I'm
matching facet1 in input string facet1::facet2::facet3...facetn

    <fieldtype name="cat1str" class="solr.TextField">
    	<analyzer type="index">
    	    <tokenizer class="solr.PatternTokenizerFactory"
pattern="^([^:]+)" group="1"/>
		</analyzer> 
    </fieldtype>

I have copyfields set up for each Category_# field.  Anything obviously
wrong?

Thanks!
Kristen

-----Original Message-----
From: yseeley@gmail.com [mailto:yseeley@gmail.com] On Behalf Of Yonik
Seeley
Sent: Wednesday, November 07, 2007 9:38 AM
To: solr-user@lucene.apache.org
Subject: Re: Can you parse the contents of a field to populate other
fields?

On 11/6/07, Kristen Roth <kristen.roth@molecular.com> wrote:
> Yonik - thanks so much for your help!  Just to clarify; where should
the
> regex go for each field?

Each field should have a different FieldType (referenced by the "type"
XML attribute).  Each fieldType can have it's own analyzer.  You can
use a different PatternTokenizer (which specifies a regex) for each
analyzer.

-Yonik

Mime
View raw message