File tree Expand file tree Collapse file tree 1 file changed +0
-6
lines changed Expand file tree Collapse file tree 1 file changed +0
-6
lines changed Original file line number Diff line number Diff line change @@ -89,19 +89,13 @@ def getsimilarmessages
89
89
conditions = Message . by_blacklisted_terms ( Blacklist . all_terms )
90
90
91
91
# Add our search condition.
92
- #conditions[:message] = Hash.new if conditions[:message].blank?
93
- #conditions[:message]['$in'] = [/#{Regexp.escape(message)}/]
94
-
95
92
conditions = conditions . where ( :message . in => [ /#{ Regexp . escape ( message ) } / ] )
96
93
97
94
# Don't search for the message we used to compare.
98
- #conditions[:id] = Hash.new
99
- #conditions[:id]['$nin'] = [message_id]
100
95
conditions = conditions . where ( :id . nin => [ message_id ] )
101
96
102
97
# Get the messages.
103
98
@messages = conditions . limit ( 50 ) . order ( "$natural DESC" )
104
- #@messages = Message.all :limit => 50, :order => "_id DESC", :conditions => conditions
105
99
106
100
if @messages . blank?
107
101
render :text => "No similar messages found"
You can’t perform that action at this time.
0 commit comments