Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions collection_indexes_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ type indexData struct {
InBackground *bool `json:"inBackground,omitempty"`
Estimates *bool `json:"estimates,omitempty"`
MinLength int `json:"minLength,omitempty"`
ExpireAfter int `json:"expireAfter,omitempty"`
ExpireAfter *int `json:"expireAfter,omitempty"`
Name string `json:"name,omitempty"`
}

Expand Down Expand Up @@ -255,7 +255,7 @@ func (c *collection) EnsureTTLIndex(ctx context.Context, field string, expireAft
input := indexData{
Type: string(TTLIndex),
Fields: []string{field},
ExpireAfter: expireAfter,
ExpireAfter: &expireAfter,
}
if options != nil {
input.InBackground = &options.InBackground
Expand Down