I have 3 tickets requested by me. After I removed 1 mine ticket from zendesk admin dashboard, Search Api is working in strange way for 3-5 mins.
e.g. such request:
/api/v2/search.json?query=type:Ticket%20requester:xxxxx&per_page=10&page=1&sort_by=created_at&sort_order=desc
returned next JSON response
{
count=3, // (it is not valid),
results=[{..}, {..}] // - two tickets - it's actually correct!!!
}
few next requests returned the same result.
After nearly ~2 mins I received the correct response
{
count=2,
results=[{..}, {..}]
}
BUT! Next request returned wrong data once again
{
count=3 (it is not valid ONCE AGAIN),
results=[{..}, {..}]
}
So it is returning wrong count in response for some time.
Also it seems to be reprodicible for tickets too. After I restore the deleted ticket I got different response (so proper one is {count=3, results=[{..},{..},{..}]})
But I've got different results for same request for few minutes:
- {count=2, results=[{..},{..}]}
- {count=3, results=[{..},{..},{..}]}
- {count=2, results=[{..},{..}]}
- {count=3, results=[{..},{..},{..}]}
Hi there Oleh-
As it states on the search API documentation, it can take up to a few minutes for results to be indexed. For a faster return of results consider our incremental ticket export.