According to documentation, you can set expireAt to 0.
However, when using EnsureTTLIndex collection method provided by go-driver package:
_, _, err := col.EnsureTTLIndex(ctx, "expireAt", 0, &driver.EnsureTTLIndexOptions{})
if err != nil {
log.Fatal(err)
}
It fails with error:
Failed to create TTL index on collection cache field expireAt TTL 0: expireAfter attribute must be a number
When using any other positive integer instead of 0, the method call succeeds.