Exact meaning of "timeout" property of "search" endpoint?

Hi all,

Recently, after some heavy-duty indexing our (PHP based) search operations were taking a full 60 seconds to complete. Looking at our OpenSearch graphs however, search latency peaked at only 2 seconds. My “read” on that difference is that once the searches actually started executing on the node, they came back in a few seconds. But before that point the requests were backed up a full minute waiting for the node to start running the search.

Am I understanding that behavior correctly? If I set a “2s” timeout on the search call, does that cover the entire search process start-to-finish? Or does that just set an upper limit on the time once the node actually starts searching the index?

Thanks!