fieldType without tokenizer

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

fieldType without tokenizer

sunnyShiny06
Hi,

I would like to create a field without tokenizer but I've an error,
I tried :

    <fieldType name="textSimple" class="solr.TextField" positionIncrementGap="100" >
      <analyzer>
        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
      </analyzer>
    </fieldType>


But I've :
May  4 17:49:41 solr-test jsvc.exec[5786]: May 4, 2009 5:49:41 PM org.apache.solr.common.SolrException log SEVERE: org.apache.solr.common.SolrException: analyzer without class or tokenizer & filter list ^Iat org.apache.solr.schema.IndexSchema.readAnalyzer(IndexSchema.java:808) ^Iat org.apache.solr.schema.IndexSchema.access$100(IndexSchema.java:58) ^Iat org.apache.solr.schema.IndexSchema$1.create(IndexSchema.java:425) ^Iat org.apache.solr.schema.IndexSchema$1.create(IndexSchema.java:443) ^Iat org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:141) ^Iat org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:452) ^Iat org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:95) ^Iat org.apache.solr.core.CoreContainer.create(CoreContainer.java:344) ^Iat org.apache.solr.core.CoreContainer.load(CoreContainer.java:222) ^Iat org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:107) ^Iat org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:69)

Thanks for your help !

Reply | Threaded
Open this post in threaded view
|

Re: fieldType without tokenizer

Shalin Shekhar Mangar
On Mon, May 4, 2009 at 9:28 PM, sunnyfr <[hidden email]> wrote:

>
> Hi,
>
> I would like to create a field without tokenizer but I've an error,
>

You can use KeywordTokenizer which does not do any tokenization.

--
Regards,
Shalin Shekhar Mangar.
Reply | Threaded
Open this post in threaded view
|

Re: fieldType without tokenizer

sunnyShiny06
hi

I tried but Ive an error :
May 12 15:48:51 solr-test jsvc.exec[2583]: May 12, 2009 3:48:51 PM org.apache.solr.common.SolrException log SEVERE: org.apache.solr.common.SolrException: Error loading class 'solr.KeywordTokenizer' ^Iat org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:310) ^Iat org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:325) ^Iat org.apache.solr.util.plugin.AbstractPluginLoader.create(AbstractPluginLoader.java:84) ^Iat org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:141) ^Iat org.apache.solr.schema.IndexSchema.readAnalyzer(IndexSchema.java:804) ^Iat org.apache.solr.schema.IndexSchema.access$100(IndexSchema.java:58) ^Iat org.apache.solr.schema.IndexSchema$1.create(IndexSchema.java:425) ^Iat org.apache.solr.schema.IndexSchema$1.create(IndexSchema.java:443) ^Iat org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:141) ^Iat org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:452) ^Iat org.apache.solr.schema.In

with :
    <fieldType name="text_simple" class="solr.TextField" positionIncrementGap="100" >
      <analyzer>
        <tokenizer class="solr.KeywordTokenizer"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
      </analyzer>
    </fieldType>



Shalin Shekhar Mangar wrote
On Mon, May 4, 2009 at 9:28 PM, sunnyfr <johanna.34@gmail.com> wrote:

>
> Hi,
>
> I would like to create a field without tokenizer but I've an error,
>

You can use KeywordTokenizer which does not do any tokenization.

--
Regards,
Shalin Shekhar Mangar.
Reply | Threaded
Open this post in threaded view
|

Re: fieldType without tokenizer

Erik Hatcher
Use KeywordTokenizerFactory.  Pasted from Solr's example schema.xml:

           <tokenizer class="solr.KeywordTokenizerFactory"/>

    Erik


On May 12, 2009, at 9:49 AM, sunnyfr wrote:

>
> hi
>
> I tried but Ive an error :
> May 12 15:48:51 solr-test jsvc.exec[2583]: May 12, 2009 3:48:51 PM
> org.apache.solr.common.SolrException log SEVERE:
> org.apache.solr.common.SolrException: Error loading class
> 'solr.KeywordTokenizer' ^Iat
> org
> .apache
> .solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:310)
> ^Iat
> org
> .apache
> .solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:325)
> ^Iat
> org
> .apache
> .solr
> .util.plugin.AbstractPluginLoader.create(AbstractPluginLoader.java:84)
> ^Iat
> org
> .apache
> .solr
> .util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:141)
> ^Iat  
> org.apache.solr.schema.IndexSchema.readAnalyzer(IndexSchema.java:804)
> ^Iat org.apache.solr.schema.IndexSchema.access$100(IndexSchema.java:
> 58) ^Iat
> org.apache.solr.schema.IndexSchema$1.create(IndexSchema.java:425) ^Iat
> org.apache.solr.schema.IndexSchema$1.create(IndexSchema.java:443) ^Iat
> org
> .apache
> .solr
> .util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:141)
> ^Iat org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:
> 452)
> ^Iat org.apache.solr.schema.In
>
> with :
>    <fieldType name="text_simple" class="solr.TextField"
> positionIncrementGap="100" >
>      <analyzer>
>        <tokenizer class="solr.KeywordTokenizer"/>
>        <filter class="solr.LowerCaseFilterFactory"/>
>        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
>      </analyzer>
>    </fieldType>
>
>
>
>
> Shalin Shekhar Mangar wrote:
>>
>> On Mon, May 4, 2009 at 9:28 PM, sunnyfr <[hidden email]> wrote:
>>
>>>
>>> Hi,
>>>
>>> I would like to create a field without tokenizer but I've an error,
>>>
>>
>> You can use KeywordTokenizer which does not do any tokenization.
>>
>> --
>> Regards,
>> Shalin Shekhar Mangar.
>>
>>
>
> --
> View this message in context: http://www.nabble.com/fieldType-without-tokenizer-tp23371300p23502994.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: fieldType without tokenizer

Koji Sekiguchi
In reply to this post by sunnyShiny06
It must be KeywordTokenizer*Factory* :)

Koji

sunnyfr wrote:

> hi
>
> I tried but Ive an error :
> May 12 15:48:51 solr-test jsvc.exec[2583]: May 12, 2009 3:48:51 PM
> org.apache.solr.common.SolrException log SEVERE:
> org.apache.solr.common.SolrException: Error loading class
> 'solr.KeywordTokenizer' ^Iat
> org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:310)
> ^Iat
> org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:325)
> ^Iat
> org.apache.solr.util.plugin.AbstractPluginLoader.create(AbstractPluginLoader.java:84)
> ^Iat
> org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:141)
> ^Iat org.apache.solr.schema.IndexSchema.readAnalyzer(IndexSchema.java:804)
> ^Iat org.apache.solr.schema.IndexSchema.access$100(IndexSchema.java:58) ^Iat
> org.apache.solr.schema.IndexSchema$1.create(IndexSchema.java:425) ^Iat
> org.apache.solr.schema.IndexSchema$1.create(IndexSchema.java:443) ^Iat
> org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:141)
> ^Iat org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:452)
> ^Iat org.apache.solr.schema.In
>
> with :
>     <fieldType name="text_simple" class="solr.TextField"
> positionIncrementGap="100" >
>       <analyzer>
>         <tokenizer class="solr.KeywordTokenizer"/>
>         <filter class="solr.LowerCaseFilterFactory"/>
>         <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
>       </analyzer>
>     </fieldType>
>
>
>
>
> Shalin Shekhar Mangar wrote:
>  
>> On Mon, May 4, 2009 at 9:28 PM, sunnyfr <[hidden email]> wrote:
>>
>>    
>>> Hi,
>>>
>>> I would like to create a field without tokenizer but I've an error,
>>>
>>>      
>> You can use KeywordTokenizer which does not do any tokenization.
>>
>> --
>> Regards,
>> Shalin Shekhar Mangar.
>>
>>
>>    
>
>