#NEWLINE# def get( self ) : #NEWLINE# #INDENT# self . response . out . write ( '<html><body>' ) #NEWLINE# self . response . out . write ( '\n          <form action="/search" method="get">\n            <div><input name="query" type="text" value=""><input type="submit" value="Search"></div>\n          </form>\n        </body>\n      </html>' ) #NEWLINE# ix = getdatastoreindex ( 'hello' , schema = SEARCHSCHEMA ) #NEWLINE# parser = QueryParser ( 'content' , schema = ix . schema ) #NEWLINE# q = parser . parse ( self . request . get ( 'query' ) ) #NEWLINE# results = ix . searcher ( ) . search ( q ) #NEWLINE# for result in results : #NEWLINE# #INDENT# self . response . out . write ( ( '<blockquote>%s</blockquote>' % cgi . escape ( result [ 'content' ] ) ) ) #NEWLINE# #UNINDENT# self . response . out . write ( '\n          <form action="/sign" method="post">\n            <div><textarea name="content" rows="3" cols="60"></textarea></div>\n            <div><input type="submit" value="Sign Guestbook"></div>\n          </form>\n        </body>\n      </html>' )