It's an int(eger) not a bool(ean value) you can have values other than 0 & 1. Also see the bool z_as_relative listed right before int z_index at the third link in my previous post.
edit:
As I said in my initial reply you could determine the index value based on y-axis location of the node. Since the z-index is a integer value you would have to think of your world coordinates as a grid and handle every world-space floating point n-units as a integral grid unit.