Skip to content

Importindex

snoop.data.management.commands.importindex #

Import elasticsearch index.

Classes#

Command #

Import elasticsearch index

Methods#
add_arguments(self, parser) #

Entry point for subclassed commands to add custom arguments.

Source code in snoop/data/management/commands/importindex.py
def add_arguments(self, parser):
    parser.add_argument('-d', '--delete', action='store_true',
                        help="Delete any existing index.")
handle(self, delete, *args, **options) #

The actual logic of the command. Subclasses must implement this method.

Source code in snoop/data/management/commands/importindex.py
def handle(self, delete, *args, **options):
    logging_for_management_command(options['verbosity'])
    indexing.import_index(delete=delete)