lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pushkar Raste <pushkar.ra...@gmail.com>
Subject Issue while adding Long.MAX_VALUE to a TrieLong field
Date Thu, 10 Sep 2015 21:43:50 GMT
I am trying following add document (value for price.long is Long.MAX_VALUE)

  <doc>
        <field name="id">411</field>
        <field name="name">one</field>
        <field name="price.long">9223372036854775807</field>
   </doc>

However upon querying my collection value I get back for "price.long"
is  9223372036854776000
(I got same behavior when I used JSON file)

Definition for 'price.long' field and 'long' look like following

<field name="price.long" type="long" indexed="true" stored="true" />
<fieldType name="long" class="solr.TrieLongField" precisionStep="0"
positionIncrementGap="0"/>

My test case shows that MAX Value Solr can store without losing precision
is  18014398509481982. This is equivalent to '2 ^53 - 1'  (Not really sure
if this computation really means something).

I wrote test using SolrTestHarness and it successfully saved value
9223372036854775807 to Solr.

Can someone help to understand why TrieLong can't accept values >
18014398509481982, when I try to use XML/JSON file to add a document

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