By default, any search performed from this bar look in to "this Mac" rather than the "current folder". Once any key word is typed a new bar appears, which allows to narrow the search by clicking on the name of current folder.
I often find more useful to perform search directly in the current folder as any global search is performed already in spotlight. Too avoid this redundancy open finder and go to "Finder preferences" (cmd + ,). Select the "Advanced" tab, and select "Search the Current folder" from the bottom menu. Now all the search done with finder will look directly in the current folder.