File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
internal/cli/deployments/search/indexes Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,10 @@ func (opts *CreateOpts) RunLocal(ctx context.Context) error {
120
120
opts .indexID .Collection = index .CollectionName
121
121
opts .indexID .Name = index .Name
122
122
123
- definition = index .Definition
123
+ definition , err = buildIndexDefinition (index .Definition )
124
+ if err != nil {
125
+ return err
126
+ }
124
127
case * atlasv2.ClusterSearchIndex :
125
128
_ , _ = log .Warningln ("you're using an old search index definition" )
126
129
idxType = index .Type
@@ -163,7 +166,7 @@ func (opts *CreateOpts) RunLocal(ctx context.Context) error {
163
166
return nil
164
167
}
165
168
166
- func buildIndexDefinition (idx * atlasv2. ClusterSearchIndex ) (any , error ) {
169
+ func buildIndexDefinition (idx any ) (any , error ) {
167
170
// To maintain formatting of the SDK, marshal object into JSON and then unmarshal into BSON
168
171
jsonIndex , err := json .Marshal (idx )
169
172
if err != nil {
You can’t perform that action at this time.
0 commit comments