ronzalo / spree_searchkick

Add Elasticsearch goodies to Spree, powered by searchkick
BSD 3-Clause "New" or "Revised" License
31 stars 57 forks source link

Add support for Spree Finder classes #28

Open haukurhrafn opened 4 years ago

haukurhrafn commented 4 years ago

In Spree's new api v2 the product search is done by posting a name filter to the products resource like so: /api/v2/storefront/products?filter[name]=rails

The v2 controllers use the new Finder classes instead of the Spree::Core::Search class that the frontend controllers use. According to the Spree dev team they are moving away from the old search class in favour of the Finder classes. So in order to be able to use SearchKicks functionality via Spree's api spree_searchkick gem needs to override/extend the Finder class.

ronzalo commented 4 years ago

@haukurhrafn originally the search class was designed for the frontend, but I will investigate if it is possible to adapt it for the future implementation of the finder class