diff options
-rw-r--r-- | app/controllers/general_controller.rb | 5 | ||||
-rw-r--r-- | todo.txt | 8 |
2 files changed, 4 insertions, 9 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 @@ -1,18 +1,10 @@ Search: -remove highlight_words var -escape HTML in solr returned highlighting - Put search box in the right places Status - document how it works Date ranges -Rubbish highlighting: -http://www.whatdotheyknow.com/search/%22MS%20Office%22 -Seems to be returning text anyway, so may as well highlight -http://localhost:8999/solr/select/?q=house&version=2.2&start=0&rows=10&indent=on - cron jobs aren't running? Should we index by individual piece of correspondence, or by whole info requests? |