#NEWLINE# def demote( self , amount_ , * queries , **kw ) : #NEWLINE# #INDENT# "\n        Returns a new S instance with boosting query and demotion.\n\n        You can demote documents that match query criteria::\n\n            q = (S().query(title='trucks')\n                    .demote(0.5, description__match='gross'))\n\n            q = (S().query(title='trucks')\n                    .demote(0.5, Q(description__match='gross')))\n\n        This is implemented using the boosting query in\n        Elasticsearch. Anything you specify with ``.query()`` goes\n        into the positive section. The negative query and negative\n        boost portions are specified as the first and second arguments\n        to ``.demote()``.\n\n        .. Note::\n\n           Calling this again will overwrite previous ``.demote()``\n           calls.\n\n        " #NEWLINE# q = Q ( ) #NEWLINE# for query in queries : #NEWLINE# #INDENT# q += query #NEWLINE# #UNINDENT# q += Q ( ** q ) #NEWLINE# return self . _clone ( next_step = ( 'demote' , ( amount_ , q ) ) )