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 Shawn Heisey <so...@elyograg.org> on 2010/03/20 19:57:34 UTC

64 bit integers (MySQL bigint) and SOLR

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


Re: 64 bit integers (MySQL bigint) and SOLR

Posted by Chris Hostetter <ho...@fucit.org>.
: 
: 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