> > While looking it at I found a bug. It returns the second column
> > in wrong order when both of the distance functions return recheck = true.
> > Test script attached to run on the regression database. I tried to
> > fix but could not. searchTreeItemDistanceRecheck function is not
> > very easy to follow. I think it deserves more comments.
>
> Fixed, thanks. It was logical error in comparison function implementation.
I managed to break it again by ordering rows only by the second column
of the index. Test script attached.