Пример #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)
Пример #2
0
def add_card_source(instance, *args, **kwargs):
    from seed.search.models import PostES
    PostES.index_post(instance)
Пример #3
0
def add_card_source(instance, *args, **kwargs):
    from seed.search.models import PostES
    PostES.index_post(instance)