From 6d1b6d1e6bb3357e41d4d92db611285668593a56 Mon Sep 17 00:00:00 2001 From: AntonioTerceiro Date: Sun, 2 Dec 2007 03:03:14 +0000 Subject: [PATCH] ActionItem25: don't search by tag; instead, index the tags so they are searched indirectly and we don't have abnormal "relevancies" --- app/controllers/public/search_controller.rb | 4 ---- app/models/article.rb | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/app/controllers/public/search_controller.rb b/app/controllers/public/search_controller.rb index 829d697..7407133 100644 --- a/app/controllers/public/search_controller.rb +++ b/app/controllers/public/search_controller.rb @@ -13,10 +13,6 @@ class SearchController < ApplicationController ############################################# search do |query| - Article.find_tagged_with(query) - end - - search do |query| Article.find_by_contents(query) end diff --git a/app/models/article.rb b/app/models/article.rb index 39e4105..9a4d259 100644 --- a/app/models/article.rb +++ b/app/models/article.rb @@ -14,7 +14,7 @@ class Article < ActiveRecord::Base acts_as_versioned - acts_as_searchable :fields => [ :name, :abstract, :body ] + acts_as_searchable :fields => [ :name, :abstract, :body, :tag_list ] # retrieves all articles belonging to the given +profile+ that are not # sub-articles of any other article. -- libgit2 0.21.2