Search and routes

How do I define the route for a search form that goes to index action,
which either lists all, if no search, or the search result?

The route can be just the same as always. The way I've done this sort
of thing is that in the controller, it checks for search params. If
it finds any, it does the search and passes along the result set, else
it passes along all. (Subject to pagination if wanted.)

-Dave