There are two potential approaches, but you have to have a consistent design approach/philosophy if you want to achieve the best user experience.
The search feature, if applied globally to the application, should sit at a level above the tabs so that the user isn’t confused about whether the search results relate to the contents in the tabs or not.
However, if the search feature only retrieves results relating to what is in the tabs, then it can also make sense for it to sit in the same level, provided that you can manage the spacing. This can be done by common strategies used in browsers to manage tabs (when you have too many to fit on the screen, especially in devices with narrow widths) or create a more compact search call-to-action (e.g. icon that expands when clicked and collapses when not in use).