You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by johnson hong <ho...@goodhope.net> on 2009/12/23 05:41:54 UTC

SCHEMA-INDEX-MISMATCH

Hi,all.
I use Lucene's NumericField to index "price" field,And query with
solr.TrieDoubleField.
When i use "price:[1  TO 5000]" to search,it can return all results that
price is between 1 and 5000.
but the price value return is
:ERROR:SCHEMA-INDEX-MISMATCH,stringValue=2000.0</str>
anybogy know why?
-- 
View this message in context: http://old.nabble.com/SCHEMA-INDEX-MISMATCH-tp26897605p26897605.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: SCHEMA-INDEX-MISMATCH

Posted by johnson hong <ho...@goodhope.net>.


Yonik Seeley-2 wrote:
> 
> On Tue, Dec 22, 2009 at 11:41 PM, johnson hong
> <ho...@goodhope.net> wrote:
>> I use Lucene's NumericField to index "price" field,And query with
>> solr.TrieDoubleField.
>> When i use "price:[1  TO 5000]" to search,it can return all results that
>> price is between 1 and 5000.
>> but the price value return is
>> :ERROR:SCHEMA-INDEX-MISMATCH,stringValue=2000.0</str>
>> anybogy know why?
> 
> The index format is compatible, but solr stores the values in binary.
> Use Solr to index, and the issues should go away.
> 
> -Yonik
> http://www.lucidimagination.com
> 
> 

Thank you,Yonik .
I dont know why solr store numericField in binary,it may be consume less 
storage,buy take more time to index.
then I must copy the code from TrieField to index in the way solr do.


-- 
View this message in context: http://old.nabble.com/get-SCHEMA-INDEX-MISMATCH-when-doing-range-query-on-lucene%27s-index.-tp26897605p26909633.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: SCHEMA-INDEX-MISMATCH

Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Tue, Dec 22, 2009 at 11:41 PM, johnson hong
<ho...@goodhope.net> wrote:
> I use Lucene's NumericField to index "price" field,And query with
> solr.TrieDoubleField.
> When i use "price:[1  TO 5000]" to search,it can return all results that
> price is between 1 and 5000.
> but the price value return is
> :ERROR:SCHEMA-INDEX-MISMATCH,stringValue=2000.0</str>
> anybogy know why?

The index format is compatible, but solr stores the values in binary.
Use Solr to index, and the issues should go away.

-Yonik
http://www.lucidimagination.com