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
name: z.string().describe("The name of the index"),
15
+
type: z.enum(["search","vectorSearch"]).optional().default("search").describe("The type of the index"),
16
+
analyzer: z
17
+
.string()
18
+
.optional()
19
+
.default("lucene.standard")
20
+
.describe(
21
+
"The analyzer to use for the index. Can be one of the built-in lucene analyzers (`lucene.standard`, `lucene.simple`, `lucene.whitespace`, `lucene.keyword`), a language-specific analyzer, such as `lucene.cjk` or `lucene.czech`, or a custom analyzer defined in the Atlas UI."
22
+
),
23
+
mappings: z
24
+
.object({
25
+
dynamic: z
26
+
.boolean()
27
+
.optional()
28
+
.default(false)
29
+
.describe(
30
+
"Enables or disables dynamic mapping of fields for this index. If set to true, Atlas Search recursively indexes all dynamically indexable fields. If set to false, you must specify individual fields to index using mappings.fields."
31
+
),
32
+
fields: z
33
+
.record(
34
+
z.string().describe("The field name"),
35
+
z
36
+
.object({
37
+
type: z
38
+
.enum([
39
+
"autocomplete",
40
+
"boolean",
41
+
"date",
42
+
"document",
43
+
"embeddedDocuments",
44
+
"geo",
45
+
"knnVector",
46
+
"number",
47
+
"objectId",
48
+
"string",
49
+
"token",
50
+
"uuid",
51
+
])
52
+
.describe("The field type"),
53
+
})
54
+
.passthrough()
55
+
56
+
.describe(
57
+
"The field index definition. It must contain the field type, as well as any additional options for that field type."
58
+
)
59
+
)
60
+
.optional()
61
+
.describe("The field mapping definitions. If `dynamic` is set to false, this is required."),
62
+
})
63
+
.describe(
64
+
"Document describing the index to create. The definition syntax depends on whether you create a standard search index or a Vector Search index."
0 commit comments