forked from pdalvi1893/strapi-indexed-search-multilingual
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch.config.example.js
42 lines (41 loc) · 1.22 KB
/
search.config.example.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
module.exports = {
search_filters: true,
entities: [
{
name: "api::initiative.initiative",
fields: ["PageTitle", "ShortDescription"],
title: "PageTitle"
},
{
name: "api::product.product",
fields: ["PageTitle", "ShortDescription"], //only search for text in the mentioned fields
title: "PageTitle", //specify the title field in a collection which will be used for autocomplete funtionality
filters: { //only make entries searchable who fulfill the below conditions
SearchPage: true,
},
},
],
map: {
others: [
"api::initiative.initiative",
"api::product.product",
],
map_entity: [
],
final_count: {
all: 0,
"api::publication.publication":0,
"api::product.product":0,
},
},
default_populate: { //in the search result for each entry if you need additional fields to be fetched (relations/components which are not fetched by default findMany)
PageSlug: true,
Image: true,
ParentPage: true,
},
custom_populate:[
],
auto_complete:{
search_by: 'startswith' //contains or startswith , default is startswith
}
};