saadmk11 / redis-search-django

Django package that provides auto indexing and searching capabilities for Django model instances using RediSearch.
https://pypi.org/project/redis-search-django/
MIT License
89 stars 6 forks source link

update index #7

Open srmarjani opened 2 years ago

srmarjani commented 2 years ago

Hi Thanks for this great library.

I have a general question. After Indexing a table into redisearch, What happens when we update some field in database of create a new row. We have to update index in redisearch manually?

saadmk11 commented 2 years ago

Hello @srmarjani,

Just like we run manage,py migrate to synchronizes the database state with the current set of models we need to run manage,py index to update the RediSearch Schema and indexed data. This is only required if you decide to index the newly added/updated fields to Redis (by adding the field to a Document Class)

Hope this answers your question. :)