Beispiel #1
0
    def handle(self, *args, **options):
        es = connections.get_connection()
        self.stdout.write('Deleting all the indices')
        es.indices.delete('blog-search')

        es.indices.create('blog-search', settings.ES_INDICES_SETTINGS)
        for post in Post.objects.all():
            PostES.index_post(post)
Beispiel #2
0
def add_card_source(instance, *args, **kwargs):
    from seed.search.models import PostES
    PostES.index_post(instance)
Beispiel #3
0
def add_card_source(instance, *args, **kwargs):
    from seed.search.models import PostES
    PostES.index_post(instance)