aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/general_controller.rb
diff options
context:
space:
mode:
authorfrancis <francis>2008-03-10 02:05:01 +0000
committerfrancis <francis>2008-03-10 02:05:01 +0000
commit51040e10587928d3228a3bbb642590b31b8d2a8c (patch)
treed61f500c1465bfede1f036cdbfebb0f27460b6be /app/controllers/general_controller.rb
parent463ecf16055408e37ac7ec46917d8df5e591dc51 (diff)
Notes, comments
Diffstat (limited to 'app/controllers/general_controller.rb')
-rw-r--r--app/controllers/general_controller.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/general_controller.rb b/app/controllers/general_controller.rb
index 4b3ee0998..fdbd87c77 100644
--- a/app/controllers/general_controller.rb
+++ b/app/controllers/general_controller.rb
@@ -5,7 +5,7 @@
# Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: general_controller.rb,v 1.5 2008-03-10 00:48:55 francis Exp $
+# $Id: general_controller.rb,v 1.6 2008-03-10 02:05:01 francis Exp $
class GeneralController < ApplicationController
@@ -52,6 +52,7 @@ class GeneralController < ApplicationController
@per_page = 20
@query = params[:query].join("/")
+ # Used for simpler word highlighting view code for users and public bodies
query_nopunc = @query.gsub(/[^a-z0-9]/i, " ")
query_nopunc = query_nopunc.gsub(/\s+/, " ")
@highlight_words = query_nopunc.split(" ")
@@ -70,6 +71,8 @@ class GeneralController < ApplicationController
]}
)
@search_results = @solr_object.results
+
+ # Extract better Solr highlighting for info request related results
@highlighting = @solr_object.highlights
end