You are absolutely right, if I patch anything, I should patch my app.
I will do se to recover the site search in my admin subsite.

Alternatively, I think that patching Hobo so the "search" scope is 
> equivalent to "hobo_search" sounds like a good solution, taking into 
> account the number of gems that overwrite "Model.search". I think this 
> can help future users when they get stuck in the same problem. What do 
> you think? 
>
I would like it, but it could open a Pandora's box.

Meanwhile regarding the front-end site search, I just implemented it 
myself, which is also not to much work. The standard 

>   def search
>     if params[:query]
>       site_search(params[:query])
>     end
>   end

get's replaced by
 

>   def search
>     if params[:query]
>       @categories = Category.search(params[:query],
>                                     where: {state: 'active'},
>                                     fields: [:name_de, :name_en, 
> :description_de, :description_en, :long_description_de, 
> :long_description_en]).results.uniq
>       @products = Product.search(params[:query],
>                                  where: {state: 'active'},
>                                  fields: [:title_de, :title_en, :number, 
> :description_de, :description_en, :long_description_de, 
> :long_description_en]).results.uniq
>       @search_results = ["Kategorien"] + @categories + ["Produkte"] + 
> @products
>       hobo_ajax_response
>     end
>   end


Because site_search can basically be replaced by any method that generates 
@search_results and than calling hobo_ajax_response .
And I add an extra

> <def tag="search-card" for="String">
>   <h1><view/></h1>
> </def>

to separate the results from different classes. Polymorphism comes in handy 
here.

Thanks for your Help!
Stefan (fully happy again with Hobo and Elasticsearch)

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/hobousers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to