How to search on different models dynamically using Elasticsearch in Django?

Criteria:

  1. Front-End templates should be dynamic

Scenario: Let's suppose there are three models(Product, Service, Merchant). If we search for the service model, all the services should be listed at the first template and other models like product and merchant can be recommend at second and third template simultaneously. All the section(templates) product, service and merchant should be made dynamic. So that whenever we search for particular model, it must be displayed at top and all other remaining models can be recommended later.

Example: Let's suppose there are three models(Product, Service, Merchant). If we search "Bag" the system should return Product model at first template and then service and merchant in other templates respectively. If we search "Laptop Repair" the system should return Service model at first template and then product and merchant in other templates respectively.

Back to Top