sorting docs by index array - pagination back