Search results delayed in REST API

Search results delayed in REST API

When we create a new contact, or update a field in an existing contact, the new data seems to be unsearchable for 120 seconds.  For instance:

1. We create a new record with Detaine_Reference_Number = 12345
2. We use the search to find any records with Detainee_Reference_Number of 12345 and the API returns 204 No Content
3. We repeat step #2 over and over for 120 seconds and receive the same results
4. After 120 seconds the record is returned in the search
5. We update the Detainee_Reference_Number to 98765
6. We use the search to find any records with Detainee_Reference_Number of 98765 and the API returns 204 No Content
7. We use the search to find any records with Detainee_Reference_Number of 12345 and the API returns the record created in step #1 AND the data shows the Detainee_Reference_Number is actually set to 98765 (even though we were searching for 12345)
8. We repeat step #6 and #7 over and over for 120 seconds and receive the same results
9. After 120 seconds step #6 returns the correct record and Step #7 returns 204 No Content (as expected)

It seems the search system is dependent on some sort of index that is only refreshed every 120 seconds.  So the search results are invalid during that period.

Is this something that can be fixed or configured so we don’t have this long delay?

This is a significant hurdle to our use case, so any help understanding this behavior or solving this issue would be appreciated.