This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.
# Create indexes for the search feature
defcreate_index(redis_connection):
# Testing if the index is already created not to throw an exception when we launch the app multiple times (and i swear it was useful when I devlopped)
# Thanks to the great RediSearch module of Redis Stack (I'll repeat the Redis doc) I can implement a search feature on every property indexed (except on students list for confidentiality of course)
# So here, I'm indexing every member of my model because I want to expose every property to let user search in every property (except on students list for confidentiality of course)
#I'm using hset/hget... because it's my favorite one + it's a fast storage data type