Use copyField to copy to a field with a field type like this:

    <fieldType name="special" class="solr.TextField"
positionIncrementGap="100">
      <analyzer type="index">
        <tokenizer class="solr.KeywordTokenizerFactory"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.PatternReplaceFilterFactory"
                pattern="([^a-z])" replacement=" " replace="all"/>
      </analyzer>
      <analyzer type="query">
        <tokenizer class="solr.KeywordTokenizerFactory"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.PatternReplaceFilterFactory"
                pattern="([^a-z])" replacement=" " replace="all"/>
      </analyzer>
    </fieldType>

This works for your example, however I can't be sure if it will work for all
of your content, but give it a try and see.

-Jay
http://www.lucidimagination.com

On Fri, Oct 9, 2009 at 1:34 AM, Chantal Ackermann <
chantal.ackerm...@btelligent.de> wrote:

> Hi Joe,
>
> WordDelimiterFilter removes different delimiters, and creates several token
> strings from the input. It can also concatenate and add that as additional
> token to the stream. Though, it concatenates without space. But maybe you
> can tweak it to your needs?
> You could also use two different fields, one creating the concatenated
> version with spaces, and the other producing the catenated tokens. (Both
> with WordDelimiter and/or RegexPattern filters etc.)
>
> Cheers,
> Chantal
>
> Joe Calderon schrieb:
>
>  hello *, im using a combination of tokenizers and filters that give me
>> the desired tokens, however for a particular field i want to
>> concatenate these tokens back to a single string, is there a filter to
>> do that, if not what are the steps needed to make my own filter to
>> concatenate tokens?
>>
>> for example, i start with "Sprocket (widget) - Blue" the analyzers
>> churn out the tokens [sprocket,widget,blue] i want to end up with the
>> string "sprocket widget blue", this is a simple example and in the
>> general case lowercasing and punctuation removal does not work, hence
>> why im looking to concatenate tokens
>>
>> --joe
>>
>

Reply via email to