Easy instant search / sorting system

How to create sorting functionality from search