Devtech

Talk about technologies

Integration of Elastic Search and Django(A Python Framework) – Part three

In the previous tutorials I made a simple django application, and made a custom command(seed_db) that populate the database with the dummy data, also take count as argument of how many products will be created. Now In this tutorial we will learn, how to index our database with the elastic search. Elasticsearch, in simple words it is like a search engine provide capabilities like full text searching, filtering, faceting and many more with fast speed on non relational JSON like documents. So its like a private search for your web application. Upto this level we had a simple django based application consist of the five models, one is built in model, i.e. User model from django.contrib.auth.models, others are Product, Category, Subcategory and the UserProfile model. We also implemented a custom command to populate database with the dummy data. So we can have any number of dummy records in our db, to make it indexed in elasticsearch. So thats the reason to make seed_db command. Now I am going to make one more custom command i.e. index_db, to index the database […]

Show Buttons
Hide Buttons