lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pablo Recio <pre...@yaco.es>
Subject Re: Possible bug in query sorting
Date Fri, 29 Oct 2010 08:17:38 GMT
That's my schema XML:

<?xml version="1.0" encoding="UTF-8" ?>
<schema name="example" version="1.2">
 <types>
   <fieldType name="string" class="solr.StrField" sortMissingLast="true"
omitNorms="true"/>
   <fieldType name="uuid" class="solr.UUIDField" indexed="true"
required="true" omitNorms="true"/>
   <fieldType name="date" class="solr.TrieDateField" omitNorms="true"
precisionStep="0" positionIncrementGap="0"/>
   <fieldType name="integer" class="solr.IntField" omitNorms="true"/>
   <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="text" type="text" indexed="true" stored="false"
required="false" multiValued="false" omitNorms="false" />
  <field name="icms_collection" type="text" indexed="true" stored="true"
required="true" multiValued="false" omitNorms="false" />
  <field name="link" type="text" indexed="true" stored="true"
required="true" multiValued="false" omitNorms="false" />
  <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>

 <uniqueKey>link</uniqueKey>
 <defaultSearchField>text</defaultSearchField>

 <solrQueryParser defaultOperator="AND"/>

 <copyField source="title" dest="text"/>
 <copyField source="contributor" dest="text"/>
 ...

</schema>


2010/10/28 Gora Mohanty <gora@mimirtech.com>

> On Thu, Oct 28, 2010 at 5:18 PM, Michael McCandless
> <lucene@mikemccandless.com> wrote:
> > Is it somehow possible that you are trying to sort by a multi-valued
> field?
> [...]
>
> Either that, or or your field gets processed into multiple tokens via the
> analyzer/tokenizer path in your schema. The reported error is a
> consequence of the fact that different documents might result in a
> different number of tokens.
>
> Please show us the part of schema.xml that defines the field type for
> the field "title".
>
> Regards,
> Gora
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message