endava-workshop / endava-akka-workshop

Endava Akka workshop Bucharest, January 2014
6 stars 3 forks source link

[search] Return consistent results for subsequent requests with the same page index and page size. #24

Open danieldoboga opened 10 years ago

danieldoboga commented 10 years ago

Currently, doing a rest request for passwords doesn't return consistent results over subsequent rest calls with the same parameters. The passwords should be kept sorted by priority and their order should be consistent overtime. For example, if I request page no. 10 with page size 1000 several times, I should receive the same results and in the same order in the chunk.

cvasii commented 10 years ago

In order to fix this issue, the index structure for a password has been changed. A document which represents a password contains the actual password and the date at which it was indexed. Now, a search request will sort the data in ascending order based on the indexed date, thereffore consistent results will get returned.