On Fri, Oct 29, 2010 at 1:47 PM, Pablo Recio <pre...@yaco.es> wrote:
> That's my schema XML:

>   <fieldType name="text" class="solr.TextField" positionIncrementGap="100">
>     <analyzer type="index">
>       <tokenizer class="solr.
> WhitespaceTokenizerFactory"/>
>       <filter class="solr.LowerCaseFilterFactory" />
>       <filter class="solr.RemoveDuplicatesTokenFilterFactory" />
>       <filter class="solr.ISOLatin1AccentFilterFactory" />
>     </analyzer>
>     <analyzer type="query">
>       <tokenizer class="solr.WhitespaceTokenizerFactory"/>
>       <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
> ignoreCase="true" expand="true"/>
>       <filter class="solr.LowerCaseFilterFactory" />
>       <filter class="solr.RemoveDuplicatesTokenFilterFactory" />
>       <filter class="solr.ISOLatin1AccentFilterFactory" />
>     </analyzer>
>   </fieldType>
>  </types>
>
>  <fields>
[...]
>  <field name="title" type="text" indexed="true" stored="true"
> required="true" multiValued="false" omitNorms="false" />
>  <field name="contributor" type="text" indexed="false" stored="false"
> required="false" multiValued="false" omitNorms="false" />
>  ....
>  </fields>
[...]

The issue is that you are using the WhitespaceTokenizerFactory
as an analyzer for the field. This is resulting in a different number
of tokens in different documents, which is causing the error.

Use a field that is non-tokenized, e.g., change the type of the
"title" field to "string". If you need a tokenized "title" field, copy
the field to another of type "string", and sort on that field instead.
Please see http://wiki.apache.org/solr/CommonQueryParameters#sort

Regards,
Gora

Reply via email to