HTTPS clone URL
Subversion checkout URL
Override the default behavior of the Active Scaffold search function to allow use of the Sphinx search engine.
Fetching latest commit...
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
Modifications for this version ======== This version has been modified to work with ActiveScaffold for Rails 2.3. Cory's version did not work due to the params hash not being created in the application stack at the time that the before_filter was being called on the plugin. Additionally, Cory's version did not clear out the query columns for the controller's Active Scaffold configuration, and therefore would not properly search on associations in the Thinking Sphinx configuration for the model being searched due to the full SQL search being performed on all columns for the search parameter. ActiveScaffold Thinking Sphinx Adapter ======== as_thinking_sphinx is a simple adapter to allow the built-in ActiveScaffold search to use the Sphinx search engine as well as the default. It was created because of the need to search tables with a large number of records. Prerequisites ======== Sphinx (http://www.sphinxsearch.com/) Thinking Sphinx (http://freelancing-god.github.com/ts/en/) ActiveScaffold (http://activescaffold.com/) Installation ======== This assumes you already have a working Sphinx installation with the Thinking Sphinx gem installed and running. Your models should already have indexes configured. script/plugin install git://github.com/coryp/as_thinking_sphinx.git Configuration ======= In the scaffold controllers in which you would like to use Sphinx, add the following line in your active_scaffold config block: config.search.engine = 'thinking_sphinx' That's it! Super-advanced configuration: If you want to specify the model you will be searching on (since by default it is derived from the current controller), add the following option: config.search.model_name = 'product' Copyright (c) 2010 Cory Patterson, released under the MIT license Copyright (c) 2010 Hans Masing, released under the MIT license