#NEWLINE# def search( self , q , filter_by = None ) : #NEWLINE# #INDENT# 'Perform a search with the given query and optional filters.\n\n        The resulting response object is returned. The search results can be\n        inspected by looking at ``response.context``.\n        ' #NEWLINE# options = { #NEWLINE# #INDENT# 'q' : q , #NEWLINE# #UNINDENT# } #NEWLINE# if q : #NEWLINE# #INDENT# options [ 'filter' ] = filter_by #NEWLINE# #UNINDENT# return self . client . get ( local_site_reverse ( 'search' ) , options )