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: src/models/IndexSettings.php
+29-3
Original file line number
Diff line number
Diff line change
@@ -6,24 +6,50 @@
6
6
7
7
class IndexSettings extends Model
8
8
{
9
-
public?string$primaryKey = null;
9
+
publicconstDEFAULT_PRIMARY_KEY = 'id';
10
10
11
11
/**
12
+
* Primary key of the index. If not specified, Meilisearch guesses your primary key from the first document you add to the index.
13
+
*
14
+
* This plugin defaults the primary key to `id` which matches most Craft elements.
15
+
*/
16
+
public ?string$primaryKey = self::DEFAULT_PRIMARY_KEY;
17
+
18
+
/**
19
+
* Ranking rules are built-in rules that rank search results according to certain criteria. They are applied in the same order in which they appear in the `rankingRules` array.
20
+
*
12
21
* @var string[]
13
22
*/
14
23
publicarray$ranking = [];
15
24
16
25
/**
17
-
* @var string[]
26
+
* The values associated with attributes in the `searchableAttributes` list are searched for matching query words. The order of the list also determines the attribute ranking order.
27
+
*
28
+
* By default, the `searchableAttributes` array is equal to all fields in your dataset. This behavior is represented by the value `["*"]`.
29
+
*
30
+
* @var ?string[]
18
31
*/
19
-
publicarray$searchableAttributes = [];
32
+
public?array$searchableAttributes = null;
20
33
21
34
/**
35
+
* Attributes in the `filterableAttributes` list can be used as filters or facets.
36
+
*
22
37
* @var string[]
23
38
*/
24
39
publicarray$filterableAttributes = [];
25
40
26
41
/**
42
+
* Attributes that can be used when sorting search results using the sort search parameter.
43
+
*
44
+
* @var string[]
45
+
*/
46
+
publicarray$sortableAttributes = [];
47
+
48
+
/**
49
+
* With Meilisearch, you can create faceted search interfaces. This setting allows you to:
50
+
* - Define the maximum number of values returned by the facets search parameter
51
+
* - Sort facet values by value count or alphanumeric order
0 commit comments