search: more consistently report timeout errors instead of "No results" when `timeout:` directive is present
Created by: ijt
This is progress on #3294 (closed) .
The fix is in search_results.go, where the call to isContextError(ctx, err)
has been replaced with a simpler check ignoring ctx.Err()
since it can sometimes happen that the indexed search times out without ctx.Err()
becoming non-nil. After this change, code search seems to no longer give the erroneous "No results" message on timeouts, although it is still racy and randomly gives different timeout errors.
This change also includes a helpful hint for a longer timeout directive in the error message.
Test plan: I manually tested it with queries like func timeout:1ms
on a sourcegraph instance with a single repo.