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.
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.