OSDN Git Service

Search command error
authoryamat0jp <yamat0jp@yahoo.co.jp>
Sat, 3 Dec 2016 21:57:24 +0000 (06:57 +0900)
committeryamat0jp <yamat0jp@yahoo.co.jp>
Sat, 3 Dec 2016 21:57:24 +0000 (06:57 +0900)
index.py

index 7fad77d..3345183 100755 (executable)
--- a/index.py
+++ b/index.py
@@ -270,7 +270,7 @@ class SearchHandler(tornado.web.RequestHandler):
         while len(element) < 3:
             element.append(element[0])
         if self.radiobox == 'comment':    
-            for x in table.find({'$or':[{'name':re.compile(element[0])},{'name':re.compile(element[1])},{'name':re.compile(element[2])}]}):
+            for x in table.find({'$or':[{'raw':re.compile(element[0])},{'raw':re.compile(element[1])},{'raw':re.compile(element[2])}]}):
                 com = ''
                 for text in x['raw'].splitlines(True):                  
                     for word in self.word.split():