From 4bd16f053847f2efe347ebda9136ef2233ee0d2c Mon Sep 17 00:00:00 2001 From: hukl Date: Tue, 28 Apr 2009 00:15:53 +0200 Subject: added thinking_sphinx plugin for fulltext search on nodes and heads --- app/models/node.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/models') diff --git a/app/models/node.rb b/app/models/node.rb index 98fe94f..4ebb3a7 100644 --- a/app/models/node.rb +++ b/app/models/node.rb @@ -17,6 +17,11 @@ class Node < ActiveRecord::Base # Validations # validates_length_of :slug, :within => 3..40 + # Index for Fulltext Search + define_index do + indexes head.globalize_translations.title + end + # Class methods # Returns a page for a given node. If no revision is supplied, it returns -- cgit v1.3