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 Iris Soto <ms...@agssa.net> on 2009/05/01 00:06:29 UTC

Re: Problems searching ranges of values with double datatype

Iris Soto escribió:
> Hi all,
>
> I am having problems with search for double datatype, for example: I'm 
> testing comparing results of search in a range of  "0 TO 1000",
> with the result of the sum from searches between ranges "0 TO 500" 
> and  "501 TO 1000" and there are diferent results.
> I've read that the correct datatype for money fields is double but 
> something is not working for me.
>
> Could someone help ?
>
Hi all,

I've troubles searching in fields of datatype double.

The datatype and field definition are defined below:
<fieldType name="double" class="solr.DoubleField" omitNorms="true"/>
<field name="salary" type="double" indexed="true" stored="true"/>

The issue is searching for ranges in the salary field, because the 
result are not correct.
I'm  testing comparing results retrieved by the following query salary:
[0 TO 1000]
which is  different of the sum of following queries:
salary:[0 TO 500]
salary:[501 TO 1000]

--
Regards,
Iris Soto.

Re: Problems searching ranges of values with double datatype

Posted by Koji Sekiguchi <ko...@r.email.ne.jp>.
Use sdouble instead of double for range queries since the      
lexicographic ordering isn't equal to the numeric ordering.

Koji


Iris Soto wrote:
> Iris Soto escribió:
>> Hi all,
>>
>> I am having problems with search for double datatype, for example: 
>> I'm testing comparing results of search in a range of  "0 TO 1000",
>> with the result of the sum from searches between ranges "0 TO 500" 
>> and  "501 TO 1000" and there are diferent results.
>> I've read that the correct datatype for money fields is double but 
>> something is not working for me.
>>
>> Could someone help ?
>>
> Hi all,
>
> I've troubles searching in fields of datatype double.
>
> The datatype and field definition are defined below:
> <fieldType name="double" class="solr.DoubleField" omitNorms="true"/>
> <field name="salary" type="double" indexed="true" stored="true"/>
>
> The issue is searching for ranges in the salary field, because the 
> result are not correct.
> I'm  testing comparing results retrieved by the following query salary:
> [0 TO 1000]
> which is  different of the sum of following queries:
> salary:[0 TO 500]
> salary:[501 TO 1000]
>
> -- 
> Regards,
> Iris Soto.
>


Re: Problems searching ranges of values with double datatype

Posted by Iris Soto <ms...@agssa.net>.
Iris Soto escribió:
> Iris Soto escribió:
>> Hi all,
>>
>> I am having problems with search for double datatype, for example: 
>> I'm testing comparing results of search in a range of  "0 TO 1000",
>> with the result of the sum from searches between ranges "0 TO 500" 
>> and  "501 TO 1000" and there are diferent results.
>> I've read that the correct datatype for money fields is double but 
>> something is not working for me.
>>
>> Could someone help ?
>>
> Hi all,
>
> I've troubles searching in fields of datatype double.
>
> The datatype and field definition are defined below:
> <fieldType name="double" class="solr.DoubleField" omitNorms="true"/>
> <field name="salary" type="double" indexed="true" stored="true"/>
>
> The issue is searching for ranges in the salary field, because the 
> result are not correct.
> I'm  testing comparing results retrieved by the following query salary:
> [0 TO 1000]
> which is  different of the sum of following queries:
> salary:[0 TO 500]
> salary:[501 TO 1000]
>
> -- 
> Regards,
> Iris Soto.
Thanks for the information.

The datatype works fine.

--
Regards,
Iris Soto.