Question on how the query results are merged

If I issue the query below:

FROM tutorial
WHERE fname = ‘Ian’

does it scan all the documents in ‘tutorial’ bucket in many servers to produce the result? Is it smart to use the secondary index or if the data exists in Elastic search?