Sunbird-RC / open-saber

Database agnostic, readily scalable APIs to store data!
https://opensaber.io/
MIT License
10 stars 44 forks source link

OS-249 Fix search query for entire db rather than range #379

Closed indrajra closed 4 years ago

indrajra commented 4 years ago

Appears this is a long standing issue hidden. The filter criteria was applied only within the range specified. Therefore, if a match was available beyond the range the match didn't surface at all. This means search isn't working. I checked this is the behaviour in 2.0.2 and perhaps even earlier.

Tests done Had search.limit set to 1 and 5 Person objects was used for all the following tests

  1. Search a person, named P2 when P1 was the first person added (sequentially).
  2. Invoked ab scripts to bombard the search and ensured everytime the result was returned (to ensure clone removal is fine).
  3. Used offset and limit to navigate through the search results. Ensured P1 through P5 records were returned.