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 Jonathan Ariel <io...@gmail.com> on 2009/03/04 20:56:03 UTC
Possible bug with sdouble?
Hi everyone!
So it seems like I ran into a bug with sdouble.
I have a document with two fields.
field1 is double
<field name="field1" type="double" indexed="true"
stored="true" omitNorms="true"/>
<field name="field2" type="sdouble"
indexed="true" stored="true" omitNorms="true"/>
when I index I send for both of them the same value (73000000) and when I'm
querying I'm getting the following
<double name="field1">73000000</double>
<double name="field2">7.3E7</double>
What do you think? Why am I getting different notations?
BTW I'm using solr 1.2
Thanks!
Jonathan
Re: Possible bug with sdouble?
Posted by Yonik Seeley <ys...@gmail.com>.
On Wed, Mar 4, 2009 at 2:56 PM, Jonathan Ariel <io...@gmail.com> wrote:
> Hi everyone!
> So it seems like I ran into a bug with sdouble.
> I have a document with two fields.
> field1 is double
>
> <field name="field1" type="double" indexed="true"
> stored="true" omitNorms="true"/>
> <field name="field2" type="sdouble"
> indexed="true" stored="true" omitNorms="true"/>
>
> when I index I send for both of them the same value (73000000) and when I'm
> querying I'm getting the following
>
> <double name="field1">73000000</double>
> <double name="field2">7.3E7</double>
>
> What do you think? Why am I getting different notations?
The straight "double" type indexes things as a string w/o doing any
sort of normalization.
So a value of 100.000 will be indexed and stored as 100.000.
"sdouble" needs to parse the float, and it gets more normalized as a byproduct.
If anything, one could consider lack of normalization a bug with
double, not sdouble.
-Yonik
http://www.lucidimagination.com
Re: Possible bug with sdouble?
Posted by Otis Gospodnetic <ot...@yahoo.com>.
I'll do the obvious one first. :)
Have you tried Solr 1.3 or, even better, 1.4-dev nightly?
Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
----- Original Message ----
> From: Jonathan Ariel <io...@gmail.com>
> To: solr-user@lucene.apache.org
> Sent: Wednesday, March 4, 2009 2:56:03 PM
> Subject: Possible bug with sdouble?
>
> Hi everyone!
> So it seems like I ran into a bug with sdouble.
> I have a document with two fields.
> field1 is double
>
>
> stored="true" omitNorms="true"/>
>
> indexed="true" stored="true" omitNorms="true"/>
>
>
>
> when I index I send for both of them the same value (73000000) and when I'm
> querying I'm getting the following
>
> 73000000
> 7.3E7
>
> What do you think? Why am I getting different notations?
>
> BTW I'm using solr 1.2
>
> Thanks!
>
> Jonathan