I strongly believe the positioning is entirely context dependant. I see three places you could implement a search field that all make sense in different contexts: at the top of the screen; directly above the content that is being searched; or at the bottom of the screen. All three have different use-cases.
Apps that pin the search to the top of the screen are generally providing a single type of information in a huge dataset that benefits greatly from search. Examples of this include mapping software, app stores, email clients, and encyclopedias of knowledge (wikis, stack, etc). This is the best option when your content is almost impossible to navigate to via conventional navigation links. This allows users to quickly narrow into the information they require even if they don't quite know exactly what they are searching for.
Pinning the search to the bottom of the screen is very similar. The benefit of pinning to the bottom is that it is much easier for mobile users to tap on and access though this pattern should not be used on larger devices. I feel that this option is better for promoting the content more than the search feature as the content gets attention first. I can't recall many apps which actually use this pattern other than one of the android web browsers (chrome tried it for a bit too) and newer android homescreens where the content of the screen is the primary concern yet search is still vitally important. Generally, this search field should just be a touch target which then slides up to the top of the screen to reveal results in a list below as the user types.
Finally, a pattern that is more prominent on desktop is to place the search field directly above the content that is being searched rather than in a primary UI component. This creates a clear link between the content and search field and indicates to the user that the field is intended for filtering the content rather than for searching for a page. You can also combine this input with other components to create a full set of filtering tools for your content.
In conclusion, when implementing a search field you should:
- Consider hiding it behind an icon if not a primary feature.
- Keep it with the content being filtered if used for filtering.
- Make it a primary UI element and easily accessible from all pages if used for navigation.
- Keep it at the top if you need other elements at the bottom such as a floating action buttons or bottom navigation.
- Always show the results below the field.