Not sure if I understand your question really. In this example all the posts that are created by every author is automatically being indexed into ElasticSearch.

If you want to only index all the posts for a specific author you could edit the bulk command so that it would use a specific author instead of all()

bulk(client=es, actions=(b.indexing() for b in models.BlogPost.objects.filter(author=1).iterator()))



Javascript developer. Passionate learner.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store