scholrly / neo4django

Drop-in Neo4j/Django integration.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Negative integers aren't indexed properly

mhluongo opened this issue · comments

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.