Yes, it's mandatory to define at least one tokenizer (and only one
tokenizer). If
you need the whole input treated as one token, you can use
KeywordTokenizerFactory.

Best
Erick

On Thu, Jun 28, 2012 at 11:10 AM, Kissue Kissue <kissue...@gmail.com> wrote:
> Hi,
>
> When defining a fieldtype is it compulsory to include a tokenizer in its
> definition?
>
> I have a field defined as follows without tokenizer:
>
> <fieldType name="lowercase_pattern" class="solr.TextField"
> positionIncrementGap="100">
>      <analyzer type="index">
>        <filter class="solr.LowerCaseFilterFactory" />
>      </analyzer>
>      <analyzer type="query">
>        <filter class="solr.LowerCaseFilterFactory" />
>      </analyzer>
>    </fieldType>
>
> Using this field when i try to start up Solr it says the field is not
> recognised. But when i change it to the following with tokenizer included
> it works:
>
> <fieldType name="lowercase_pattern" class="solr.TextField"
> positionIncrementGap="100">
>      <analyzer type="index">
>        <tokenizer class="solr.KeywordTokenizerFactory"/>
>        <filter class="solr.LowerCaseFilterFactory" />
>      </analyzer>
>      <analyzer type="query">
>        <tokenizer class="solr.KeywordTokenizerFactory"/>
>        <filter class="solr.LowerCaseFilterFactory" />
>      </analyzer>
>    </fieldType>
>
> Thanks.

Reply via email to