Back

Add Appwrite to Meilisearch 🤩 !

  • 0
  • Users
  • Functions
  • Databases
  • Web
loup
20 Mar, 2023, 16:03

Okay , well I want to add an appwrite collection to my Meilisearch instance. In fact, I've an user collection with contain the username of each user. And I want to add a searching functionality to my NextJS app for username. So how can I do to update automatically the Meilisearch index that we gonna call user when user Appwrite's collection is update to (new user, update user, deleted user, ...) ? I have absolutely no idea how to do it 😄

TL;DR
The user wants to add Appwrite functionality to Meilisearch for searching usernames in their NextJS app. They are unsure how to update the Meilisearch index when the Appwrite collection is updated. A user suggests using GraphQL for this purpose, but another user mentions that they don't need Meilisearch and can use Appwrite's search query instead. They recommend creating a function that triggers when CRUD operations are performed on the Appwrite database to update the index. The user can refer to the Appwrite documentation for a list of events that can trigger a function. The user also shares an example of how to relate users with
Mickaël LT
20 Mar, 2023, 16:14

A function triggered by database CRUD operation, and so this function can update the meilisearch indexation ?

joeyouss
20 Mar, 2023, 16:44

Hey, thank you for your question, is this regarding the Github Octernship? just curious to know more and help accordingly.

Drake
20 Mar, 2023, 17:13

btw, I'm not sure if you need meilisearch for this...have you looked into using Appwrite's search query?

rafagazani
21 Mar, 2023, 00:28

You can create a function that fires when events fire teams.*.memberships.*.create teams.*.memberships.*.delete teams.*.memberships.*.update

If you don't work with a team, you can trigger the events: users.*.create users.*.delete users.*.update

here is a list of all events that can trigger a function: https://appwrite.io/docs/events

In my application, there is a collection with the information of all users. I need these collections because I have a team that manages other teams Here is the example: https://github.com/rafagazani/relacionar_usuario_com_equipe_example

rafagazani
21 Mar, 2023, 00:38

as steven wrote you don't need meilisearch

loup
21 Mar, 2023, 10:14

Heuu its because Im gonna use Meilisearch for searching movies too so I need a search engine for everything. Unless with APpwrite it is possible to search in several collections at the same time (and have a single list returning the most relevant answers, films and users mixed?)

loup
21 Mar, 2023, 10:15

And does the search Appwrite Engine allow typos?

Ankur Singh
21 Mar, 2023, 11:21

For octernship, does we have to update the Meilisearch data when CRUD operation is performed to Appwrite Database?

rafagazani
21 Mar, 2023, 13:00

you can try with graphql.

Drake
21 Mar, 2023, 16:00

no, so for that use case, you'll need a more advanced full text search like Meilisearch 👍🏼

loup
22 Jun, 2023, 14:12

Okay I comeback to this channel for adding the function that will bridge appwrite and meilisearch

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more