[Critical] Search API returns wrong results for pull requests #53799
Replies: 1 comment
-
|
The core issue: GitHub's Search API runs on a separate index from the main REST API. That index is not real-time β it has a lag, sometimes minutes, sometimes longer during high-traffic periods. So when you create or update a PR and immediately search for it, you're querying stale data. The PR exists, the main API knows about it, but Search hasn't indexed it yet.
For anything requiring accuracy β use GET /repos/{owner}/{repo}/pulls with filters, not the Search API One thing worth knowing: the Search API also has a stricter rate limit β 30 requests/minute authenticated vs 10 unauthenticated β completely separate from the REST API's limits. So if you're hitting both in the same app, track them independently. Treat GitHub Search like a search engine, not a database. It's fast and powerful for discovery, but eventual consistency is the contract, not an exception. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Bug
Body
The search API stopped working correctly today. It does not return all results when using the
draftqualifier, see example below:is:pr is:open(returns all open PRs correctly, 10 results)is:pr is:open draft:false(returns only 1 result, should be 8 results as you can see from the list above)It does not seem to happen in all repositories, but we've managed to reproduce this issue in one of our private repositories:
joinbuzz/buzz.We've noticed the same inconsistency using global search API. This is critical for us as we're heavily dependent on this API and it produces unexpected results in the last days.
Beta Was this translation helpful? Give feedback.
All reactions