<s> from optparse import make_option <EOL> from django . core . management . base import BaseCommand , CommandError <EOL> from kitsune . search . es_utils import es_search_cmd <EOL> from kitsune . search . utils import FakeLogger <EOL> class Command ( BaseCommand ) : <EOL> help = '<STR_LIT>' <EOL> option_list = BaseCommand . option_list + ( <EOL> make_option ( '<STR_LIT>' , type = '<STR_LIT:int>' , dest = '<STR_LIT>' , default = <NUM_LIT:1> , <EOL> help = '<STR_LIT>' ) , ) <EOL> def handle ( self , * args , ** options ) : <EOL> pages = options [ '<STR_LIT>' ] <EOL> if not args : <EOL> raise CommandError ( '<STR_LIT>' ) <EOL> query = u'<STR_LIT:U+0020>' . join ( args ) <EOL> es_search_cmd ( query , pages , FakeLogger ( self . stdout ) ) </s>
