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
+54Lines changed: 54 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -350,6 +350,60 @@ module.exports = {
350
350
351
351
[See resources](./resources/meilisearch-settings) for more settings examples.
352
352
353
+
#### 👥 Populate
354
+
355
+
Content-types in Strapi may have relationships with other content-types. To ensure that these links are fetched and added to an entry correctly from your Strapi database, the correct populate rule must be provided ([see documentation](https://docs-next.strapi.io/developer-docs/latest/developer-resources/database-apis-reference/entity-service/populate.html#basic-populating)).
356
+
357
+
To communicate the populate rule, use the `populate` setting on the according content-type in the plugin's settings.
358
+
359
+
**For example**
360
+
361
+
Imagine my `restaurant` content-type has a relation with a repeatable-component `repeatableComponent` that itself has a relationship with the content-type `categories`.
362
+
363
+
The following population will ensure that a `restaurant` entry contains even the most nested.
by provinding this, the following is indexed in Meilisearch:
378
+
379
+
```json
380
+
{
381
+
"id": "restaurant-1",
382
+
"title": "The slimmy snail",
383
+
// ... other restaurant fields
384
+
"repeatableComponent": [
385
+
{
386
+
"id": 1,
387
+
"title": "my repeatable component 1"
388
+
"categories": [
389
+
{
390
+
"id": 3,
391
+
"name": "Asian",
392
+
// ... other category fields
393
+
},
394
+
{
395
+
"id": 2,
396
+
"name": "Healthy",
397
+
// ... other category fields
398
+
}
399
+
],
400
+
401
+
}
402
+
],
403
+
404
+
}
405
+
```
406
+
353
407
### 🕵️♀️ Start Searching <!-- omit in toc -->
354
408
355
409
Once you have a content-type indexed in Meilisearch, you can [start searching](https://docs.meilisearch.com/learn/getting_started/quick_start.html#search).
0 commit comments