Skip to content

Instantly share code, notes, and snippets.

@chadwpry
Created September 25, 2008 22:53
Show Gist options
  • Save chadwpry/12974 to your computer and use it in GitHub Desktop.
Save chadwpry/12974 to your computer and use it in GitHub Desktop.
class Story < ActiveRecord::Base
# FULLTEXT INDEXING
is_indexed :fields => [
{:field => 'title', :sortable => true},
:content, :teaser, :category_id
],
:include => [
{:association_name => 'category', :field => 'name', :as => 'category_name'},
{:association_name => 'category', :field => 'parent_id'}
]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment