Front | Back |
Step 1: how to create a connection from django app to elasticsearch.
|
|
Step 2: how to set up index for a model? (Define a mapping from model_index to model data)
|
|
Step 3: how to create indexing method for each model?
|
|
Step 4: how to run indexing for a model? ( the bulk command)
|
|
Step 5: Create a search method
|
|
A. Tell the workflow of automating indexing of any newly saved instance of model?
|
|
A1. How to create a signal to fire a model method?
|
|
A2. How to register Django that we are using signals
|
|
A3. How to tell Django that we want to apply this signal to the app?
|
1. open the __init__.py in the app folder2. register the new AppConfig we just created in step A2 |
When to run model_index.init(index="")?
|
Whenere we update a mapping, thisfunction would have configured Elasticsearch with the new document type.
|
How to create django command to run the bulk indexing?
|
|
B. How to add elasticsearch to dajngo app?
|
|
B2. How to modify a class-based view to handle elasticsearch?
|
|
How to handle elasticsearch connection in one place?
|
|
How to create a search for a range of values?
|
|