So basically I want to create a search functionality for my users schema. I would take in a query for a user based on their name and return relevant users.
For example:
query = "leo", response = ["leonel messi", "leonardo dicaprio", ...]
I already tried using the text index but since that requires entire words to be inputted, it doesn't fit my constraints since a query will most likely be characters rather than entire words.
So essentially Im looking to make an autocomplete which returns relevant users based on some input from the user.
How could I accomplish this? Thank you!