mirror of
https://github.com/diaspora/diaspora.git
synced 2026-04-29 03:01:03 -04:00
Putting an index on Person#diaspora_handle
This commit is contained in:
@@ -40,6 +40,8 @@ class Person
|
||||
validates_format_of :url, :with =>
|
||||
/^(https?):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*(\.[a-z]{2,5})?(:[0-9]{1,5})?(\/.*)?$/ix
|
||||
|
||||
ensure_index :diaspora_handle
|
||||
|
||||
def self.search(query)
|
||||
return Person.all if query.to_s.empty?
|
||||
query_tokens = query.to_s.strip.split(" ")
|
||||
|
||||
Reference in New Issue
Block a user