Learn how to use Meilisearch with Strapi v4.
my-app
where you will add the back and front-end parts of the application. Generate a back-end API using Strapi inside my-app
:
back
and opens the admin dashboard. Create an account to access it.
Content Manager > Collection Types
. If you click on Restaurant
, you can see that there is only one. Add more by clicking the + Create new entry
button in the upper-right corner of the dashboard.
Save
and then Publish
.
The Butter Biscotte
All about butter, nothing about health.
French food
category on the bottom right corner of the page.
The Slimy Snail
Gastronomy is made of garlic and butter.
French food
The Smell of Blue
Blue Cheese is not expired, it is how you eat it. With a bit of butter and a lot of happiness.
French food
Ctrl+C
to kill the process.
Next, install the plugin in the back
directory.
meilisearch
plugin on the left side of the screen.
meilisearch
plugin page.
Collections
tab on the meilisearch
plugin page, you should see the restaurant
and category
content-types.
By clicking on the checkbox next to restaurant
, the content-type is automatically indexed in Meilisearch.
restaurant
’s checkbox in the Collections
tab. This means that each time you add, update or delete an entry in your restaurant content-types, Meilisearch is automatically updated.
Once the indexing finishes, your restaurants are in Meilisearch. Access the search preview confirm everything is working correctly by searching for “butter”.