You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+52-23Lines changed: 52 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@
25
25
26
26
MeiliSearch is an open-source search engine. [Discover what MeiliSearch is!](https://github.com/meilisearch/meilisearch)
27
27
28
-
Add your Strapi collections into a MeiliSearch instance. The plugin listens to modifications made on your collections and update MeiliSearch accordingly.
28
+
Add your Strapi collections into a MeiliSearch instance. The plugin listens to modifications made on your collections and updates MeiliSearch accordingly.
29
29
30
30
## Table of Contents <!-- omit in toc -->
31
31
@@ -61,7 +61,7 @@ To apply the plugin to Strapi, a re-build is needed:
61
61
strapi build
62
62
```
63
63
64
-
You will need both a running Strapi app and a running MeiliSearch instance. For [specific version compatibiliy see this section](#-compatibility-with-meilisearch).
64
+
You will need both a running Strapi app and a running MeiliSearch instance. For [specific version compatibility see this section](#-compatibility-with-meilisearch).
65
65
66
66
### 🏃♀️ Run MeiliSearch
67
67
@@ -79,17 +79,17 @@ yarn develop
79
79
If you don't have a running Strapi project yet, you can either launch the [playground present in this project](#playground) or [create a Strapi Project](#create-strapi-project).
80
80
81
81
82
-
It is recommended to add your collections in developement mode as it allows the server reloads, needed to apply hooks.
82
+
We recommend adding your collections in development mode to allow the server reloads needed to apply hooks.
83
83
84
84
```bash
85
85
strapi develop
86
86
```
87
87
88
88
## 🎬 Getting Started
89
89
90
-
Now that you have installed the plugin, a running meiliSearch instance and, a running Strapi app, lets go the plugin page on your admin dashboard.
90
+
Now that you have installed the plugin, a running meiliSearch instance and, a running Strapi app, let's go to the plugin page on your admin dashboard.
91
91
92
-
On the left-navbar `MeiliSearch` appears under the `PLUGINS` category. If it does not, ensure that you have installed the plugin and re-build Strapi (see [installation](#-installation)).
92
+
On the left-navbar,`MeiliSearch` appears under the `PLUGINS` category. If it does not, ensure that you have installed the plugin and re-build Strapi (see [installation](#-installation)).
93
93
94
94
### 🤫 Add Credentials
95
95
@@ -111,20 +111,18 @@ If you don't have any collection yet in your Strapi Plugin, please follow [Strap
111
111
112
112
We will use, as **example**, the collections provided by Strapi's quickstart.
113
113
114
-
On your plugin homepage you should have two collections appearing: `restaurant` and `category`.
114
+
On your plugin homepage, you should have two collections appearing: `restaurant` and `category`.
115
115
116
116
<palign="center">
117
117
<imgsrc="./assets/collections_indexed.png"alt="Indexed collections need a reload"width="600"/>
118
118
</p>
119
119
120
-
By clicking on the left checkbox, the collection will be automatically indexed in MeiliSearch. For example, if you click on the `restaurant` checkbox, all your restaurants are now available in MeiliSearch.
121
-
122
-
You can check it using
120
+
By clicking on the left checkbox, the collection is automatically indexed in MeiliSearch. For example, if you click on the `restaurant` checkbox, all your restaurants are now available in MeiliSearch. We will see in [start searching](#-start-searching) how to try it out.
123
121
124
122
### 🪝 Apply Hooks
125
123
126
124
Hooks are listeners that update MeiliSearch each time you add/update/delete an entry in your collections.
127
-
In order to activate them you will have to reload the server. This is possible by clicking on the `Reload Server` button if you are in auto-reload mode, or by manually reloading the server mode.
125
+
To activate them, you will have to reload the server. If you are in develop mode, click on the red `Reload Server` button. If not, reload the server manually!
128
126
129
127
130
128
<palign="center">
@@ -136,16 +134,23 @@ In order to activate them you will have to reload the server. This is possible b
136
134
137
135
Once you have a collection containing documents indexed in MeiliSearch, you can [start searching](https://docs.meilisearch.com/learn/getting_started/quick_start.html#search).
138
136
139
-
Using the above credentials the following code shows how to search on one of your collections:
137
+
Using the above credentials, the following code shows how to search on one of your collections:
140
138
141
139
To search in MeiliSearch, you can use the [instant-meilisearch](https://github.com/meilisearch/instant-meilisearch) SDK that integrates a whole search interface, or our library [meilisearch-js](https://github.com/meilisearch/meilisearch-js).
142
140
143
141
#### ⚡️ Using Instant meiliSearch
144
142
143
+
You can have a front up and running in record time with [instant-meilisearch](https://github.com/meilisearch/instant-meilisearch).
In Instant MeiliSearch, you only have to provide your credentials and index name (`restaurant` is the index name in our example).
145
151
146
-
In Instant MeiliSearch you only have to provide your credentials and your index name (`restaurant` is the index name in our example).
152
+
You can have a quick preview with the following code in an HTML file. Create an HTML file, copy-paste the code below and open the file in your browser (or find it in `/front_examples/restaurant.html`).
147
153
148
-
You can have a quick preview the following code in a HTML file
149
154
```html
150
155
<!DOCTYPE html>
151
156
<htmllang="en">
@@ -162,7 +167,7 @@ You can have a quick preview the following code in a HTML file
Install Strapi with this **Quickstart** command to create a Strapi project instantly:
255
+
This command will install the required dependencies and launch the app in development mode. You should be able to reach it on the [port 8000 of your localhost](http://localhost:8000/admin/).
256
+
257
+
### Create Strapi project
258
+
259
+
Install Strapi with this [quickstart]((https://strapi.io/documentation/developer-docs/latest/getting-started/quick-start.html)) command to create a Strapi project instantly:
_This command generates a brand new project with the default features (authentication, permissions, content management, content type builder & file upload). The **Quickstart** command installs Strapi using a **SQLite** database which is used for prototyping in development._
273
+
_This command generates a brand new project with the default features (authentication, permissions, content management, content type builder & file upload). The **Quickstart** command installs Strapi using a **SQLite** database used for prototyping in development._
261
274
262
-
Once your Strapi project has been created, to link the plugin to this project you have to create a symbolic link inside a plugin folder at the root of the Strapi project.
275
+
Once your Strapi project has been created, to link the plugin to this project you have to create a symbolic link inside a plugin folder Strapi's project root.
263
276
264
277
1. Create plugin folder
265
278
@@ -287,22 +300,27 @@ You can now use the plugin on your Strapi project.
287
300
288
301
## 🤖 Compatibility with MeiliSearch and Strapi
289
302
290
-
Complete installation requirements are exact same as for Strapi itself and can be found in the documentation under [Installation Requirements](https://strapi.io/documentation/v3.x/installation/cli.html#step-1-make-sure-requirements-are-met).
303
+
Complete installation requirements are the same as for Strapi itself and can be found in the documentation under [installation Requirements](https://strapi.io/documentation/v3.x/installation/cli.html#step-1-make-sure-requirements-are-met).
291
304
292
305
**Supported Strapi versions**:
293
306
294
307
- Strapi v3.4.x
295
308
296
309
(This plugin may work with the older Strapi versions, but these are not tested nor officially supported at this time.)
297
310
311
+
**Supported MeiliSearch versions**:
312
+
313
+
- MeiliSearch v0.19
314
+
315
+
To update MeiliSearch to a more recent version, please follow [this guide](https://docs.meilisearch.com/create/how_to/updating.html#update-to-the-latest-meilisearch-version).
316
+
298
317
**Node / NPM versions**:
299
318
300
319
- NodeJS >= 12.10 <= 14
301
320
- NPM >= 6.x
302
321
303
322
**We recommend always using the latest version of Strapi to start your new projects**.
304
323
305
-
306
324
## ⚙️ Development Workflow and Contributing
307
325
308
326
Any new contribution is more than welcome in this project!
@@ -311,5 +329,16 @@ If you want to know more about the development workflow or want to contribute, p
311
329
312
330
## 🌎 Community support
313
331
314
-
- For general help using Strapi, please refer to [the official Strapi documentation](https://strapi.io/documentation/).
- For general help using **Strapi**, please refer to [the official Strapi documentation](https://strapi.io/documentation/).
336
+
337
+
## 🤩 Just for the pleasure of the eyes
338
+
339
+
Using the [foodadvisor](https://github.com/strapi/foodadvisor) restaurant demo Strapi provided. We added a searchbar to it using [instant-meilisearch](https://github.com/meilisearch/instant-meilisearch).
0 commit comments