64 bit integers (MySQL bigint) and SOLR

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

64 bit integers (MySQL bigint) and SOLR

Shawn Heisey-4
The primary key for my database is a BIGINT,  basically a 64 bit
integer.  The value is well below the 32 bit maximum (about 230 million
right now) but someday in the future that might not be the case.  In the
schema, we have it mapped to a "tint" field type as defined in the
example schema.  Is this going to work?  It is 64 bit CentOS 5.4 with 64
bit Sun JDK 1.6.0_18.  I did some searching and was not able to
determine much.

<fieldType name="tint" class="solr.TrieIntField" precisionStep="8"
omitNorms="true" positionIncrementGap="0"/>

Thanks,
Shawn

Reply | Threaded
Open this post in threaded view
|

Re: 64 bit integers (MySQL bigint) and SOLR

hossman
:
: The primary key for my database is a BIGINT,  basically a 64 bit integer.  The
: value is well below the 32 bit maximum (about 230 million right now) but
: someday in the future that might not be the case.  In the schema, we have it
: mapped to a "tint" field type as defined in the example schema.  Is this going
: to work?  It is 64 bit CentOS 5.4 with 64 bit Sun JDK 1.6.0_18.  I did some
: searching and was not able to determine much.

No.  But a TrieLongField should.  

The "Int" and "Long" in the FieldType names corrisponds directly to the
java primitive types, which do not change recardless of wether you have a
64 bit JVM...
  http://java.sun.com/docs/books/tutorial/java/nutsandbolts/datatypes.html

(FYI: this is fairly trivial to test .. just index a realy big number and
see if it sorts/searches properly)


-Hoss