aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/user.rb
diff options
context:
space:
mode:
authorfrancis <francis>2008-04-24 23:52:59 +0000
committerfrancis <francis>2008-04-24 23:52:59 +0000
commit5a980feffda3b378867b534659d89be8edcb9cf4 (patch)
tree57996a67948afcce84d4cd63a85bf9bd7b8040e7 /app/models/user.rb
parent1dc7f0e3ffd4ddc61759e033437569093672340e (diff)
Change from acts_as_solr to acts_as_xapian
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 76b63c310..9042fda26 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -21,7 +21,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: user.rb,v 1.51 2008-04-21 16:44:06 francis Exp $
+# $Id: user.rb,v 1.52 2008-04-24 23:52:59 francis Exp $
require 'digest/sha1'
@@ -41,11 +41,9 @@ class User < ActiveRecord::Base
attr_accessor :password_confirmation
validates_confirmation_of :password, :message =>"^Please enter the same password twice"
- acts_as_solr :fields => [
- {:name => { :boost => 5.0 }},
- { :created_at => :date },
- { :variety => :string }
- ]
+ acts_as_xapian :texts => [ :name ],
+ :values => [ [ :created_at, 0, "created_at", :date ] ],
+ :terms => [ [ :variety, 'V', "variety" ] ]
def variety
"user"
end