How do I convert a string to an array so that it can be searched one by one. For example if the parameter passed is `puma shirts`,I want to split it as `puma` and `shirt` so that I can do solr search with `puma` in `table1` and get the ids. In the second chance I want to do solr search with `shirts` in `table1`. Here is the controller code that I'm currently using.

```
def search_all
    ids1=Array.new       

    @search1=Table1.search do
      fulltext params[:text]
    end

    @search1.results.each do |result|
      ids1 << result.id
    end
end

```

How do I do this?