17
17
use function key ;
18
18
19
19
/**
20
+ * @link https://www.mongodb.com/docs/atlas/atlas-search/define-field-mappings/#std-label-fts-field-mappings
20
21
* @phpstan-type TypeSearchIndexField array{
21
22
* type: 'boolean'|'date'|'dateFacet'|'objectId'|'stringFacet'|'uuid',
22
23
* } | array{
51
52
* multi?: array<string, array<mixed>>,
52
53
* norms?: 'include'|'omit',
53
54
* }
55
+ * @link https://www.mongodb.com/docs/atlas/atlas-search/analyzers/character-filters/
54
56
* @phpstan-type TypeSearchIndexCharFilter array{
55
57
* type: 'icuNormalize'|'persian',
56
58
* } | array{
60
62
* type: 'mapping',
61
63
* mappings?: array<string, string>,
62
64
* }
65
+ * @link https://www.mongodb.com/docs/atlas/atlas-search/analyzers/token-filters/
63
66
* @phpstan-type TypeSearchIndexTokenFilter array{type: string, ...}
67
+ * @link https://www.mongodb.com/docs/atlas/atlas-search/analyzers/custom/
64
68
* @phpstan-type TypeSearchIndexAnalyzer array{
65
69
* name: string,
66
70
* charFilters?: TypeSearchIndexCharFilter,
67
71
* tokenizer: array{type: string},
68
72
* tokenFilters?: TypeSearchIndexTokenFilter,
69
73
* }
74
+ * @link https://www.mongodb.com/docs/atlas/atlas-search/stored-source-definition/#std-label-fts-stored-source-definition
70
75
* @phpstan-type TypeSearchIndexStoredSource bool | array{
71
76
* includes: array<string>,
72
77
* } | array{
73
78
* excludes: array<string>,
74
79
* }
80
+ * @link https://www.mongodb.com/docs/manual/reference/command/createSearchIndexes/#std-label-search-index-definition-create
75
81
* @phpstan-type TypeSearchIndexDefinition array{
76
82
* analyser?: string,
77
83
* analyzers?: TypeSearchIndexAnalyzer[],
78
84
* searchAnalyzer?: string,
79
85
* mappings: array{dynamic: true} | array{dynamic?: bool, fields: array<string, TypeSearchIndexField>},
80
86
* storedSource?: TypeSearchIndexStoredSource,
81
87
* }
88
+ * @link https://www.mongodb.com/docs/atlas/atlas-vector-search/vector-search-type/#atlas-vector-search-index-fields
82
89
* @phpstan-type TypeVectorSearchIndexField array{
83
90
* type: 'vector',
84
91
* path: string,
89
96
* type: 'filter',
90
97
* path: string,
91
98
* }
99
+ * @link https://www.mongodb.com/docs/atlas/atlas-vector-search/vector-search-type/#atlas-vector-search-index-fields
92
100
* @phpstan-type TypeVectorSearchIndexDefinition array{
93
101
* fields: array<string, TypeVectorSearchIndexField>,
94
102
* }
@@ -383,7 +391,7 @@ public function sparse_and_unique($columns = null, $options = [])
383
391
/**
384
392
* Create an Atlas Search Index.
385
393
*
386
- * @see https://www.mongodb.com/docs/manual/reference/command/createSearchIndexes/
394
+ * @see https://www.mongodb.com/docs/manual/reference/command/createSearchIndexes/#std-label-search-index-definition-create
387
395
*
388
396
* @phpstan-param TypeSearchIndexDefinition $definition
389
397
*/
@@ -397,7 +405,7 @@ public function searchIndex(array $definition, string $name = 'default'): static
397
405
/**
398
406
* Create an Atlas Vector Search Index.
399
407
*
400
- * @see https://www.mongodb.com/docs/atlas/atlas- vector-search/
408
+ * @see https://www.mongodb.com/docs/manual/reference/command/createSearchIndexes/#std-label- vector-search-index-definition-create
401
409
*
402
410
* @phpstan-param TypeVectorSearchIndexDefinition $definition
403
411
*/
0 commit comments