.search() method and order of returned values

Hello all! Im having trouble with .search method of algoliasearch/lite npm package. Im using .search() method and I provide array of ids that I get from backend API as filterFacets value.
Algolia returns them but not in same order as I got from backend API. I’ve also removed all ranking and sorting rules on dashboard but nothing seems to be working. Anyone has any thoughts?

E.g.
backend:
aabbde35-4389-4efd-9381-56f2946a5002
e671d9ef-2e17-4db7-9cd3-01557418b802
32352e4b-c010-4046-99b3-e7d37212ec8a
d97aafa6-8ca3-4a27-9f10-c5b0bea5dd4b
8847492b-72e9-490d-b9ab-5e7b01ed507a

algolia:
aabbde35-4389-4efd-9381-56f2946a5002
a5c8ac01-74b7-4626-8d70-10c82a29c465
8847492b-72e9-490d-b9ab-5e7b01ed507a
34ed5b3e-94d6-47c9-a66b-7e886f49c343
ab366933-eee1-4358-9d36-2fe2de36878d

Hi there!

Indeed, the search method is not optimised to retrieve hits using their objectID. Have you tried the getObjects method instead ?

Let us know how it goes!

Hello @marie.gillier! Yes, I’m aware of getObjects method but the issue Im having with that method is pagination. I need to paginate trough those results.