How to alter view query to display only 5 top records I couldn't find a similar problem on the forum so I am asking. I created a view with exposed filters but when I visit the view page I am going display 5 top recent record for specific content type. When I click search button the result changes of course and result with a pager shows up. How can I display 5 top recent records before I click search button for the first time when I visit page with the view? I thought to use hook_views_query_alter to add limit to the query but I don't know how. Any ideas how to achieve that?

Thank you!
If within the Views Pager options, you select "Display a specified number of items" and set "Items to display" to 5, you will get the behavior you are desiring.  You just need to make sure your sort criteria provides whatever "top" means on your site.  What I think you are doing instead is selecting "Use Pager" with 5 items.