I setup a content source to include my site and did a full crawl and everything went fine without errors.
But then search was not returning any results.
In the central administration site I found that service application associations were not correct for the given web application as shown in the screenshot:
As is clear from the screenshot FAST Query was selected by default whereas I needed Search Service Application. After making the changes the search started working but now it was giving results only for the admin accounts and not for other users with proper permissions. It turns out that Search service account needs to be added to "Windows Authorazation Access Group" as can be seen from this article.
But then search was not returning any results.
In the central administration site I found that service application associations were not correct for the given web application as shown in the screenshot:
As is clear from the screenshot FAST Query was selected by default whereas I needed Search Service Application. After making the changes the search started working but now it was giving results only for the admin accounts and not for other users with proper permissions. It turns out that Search service account needs to be added to "Windows Authorazation Access Group" as can be seen from this article.