[ 
https://issues.apache.org/jira/browse/SOLR-309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12564042#action_12564042
 ] 

Andy Blower commented on SOLR-309:
----------------------------------

Has this been changed in the latest version of SOLR? I'm using v1.2.0 and it 
was unclear from the documentation whether it is valid to specify analyzers for 
non-text fields. I tried it when I wanted a simple tokenized string field, and 
it appears to work. Here's my field definition:

                <!-- Fieldtype for simple tokenized strings. (Don't use for 
sorting, do use for space separated codes) -->
                <fieldType name="stringText" class="solr.TextField" 
positionIncrementGap="0" omitNorms="true">
                        <analyzer>
                                <tokenizer 
class="solr.WhitespaceTokenizerFactory"/>
                        </analyzer>
                </fieldType>

I use it for fields that have whitespace separated codes e.g. "101 104 15a 
075". Just using a string field meant I could only find the exact full string 
rather than individual codes.

> A solr.StrField that has analyzers configured should emit warning to log
> ------------------------------------------------------------------------
>
>                 Key: SOLR-309
>                 URL: https://issues.apache.org/jira/browse/SOLR-309
>             Project: Solr
>          Issue Type: Improvement
>          Components: search
>            Reporter: Thomas Peuss
>            Priority: Minor
>
> A solr.StrField that has analyzers configured in schema.xml should emit a 
> warning/error to the log. As I understand StrFields never get tokenized.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to