scholrly / neo4django

Drop-in Neo4j/Django integration.
GNU General Public License v3.0
357 stars 83 forks source link

Negative integers aren't indexed properly #232

Open mhluongo opened 10 years ago

mhluongo commented 10 years ago

Positive integers are simply indexed as zero-filled strings, but negative flip the leading '0' to a '-'. While this makes all negatives less than all positives, it leads to misbehavior on querying a range of negative values on an indexed integer property.

A better scheme might be to simply index the integers as 1's complement with a base64 encoding, ensuring order and a more compact representation.