Fixed index sorting by association