Hmm you need to create a controller for that

``` ruby
# SearchController#index
# /search?q=some+words
def index
  Document.search(params[:search])
end
```