coal/indexer.go
func (i *Indexer) Add(model Model, unique bool, expireAfter time.Duration, fields ...string) {
	// construct key from fields
	var key []string
	for _, f := range fields {
		key = append(key, F(model, f))
	}

	// add index
	i.AddRaw(C(model), mgo.Index{
		Key:         key,
		Unique:      unique,
		ExpireAfter: expireAfter,
		Background:  true,
	})
}
func (i *Indexer) Add(model Model, unique bool, expireAfter time.Duration, fields ...string) {
	// construct key from fields
	var key []string
	for _, f := range fields {
		key = append(key, F(model, f))
	}

	// add index
	i.AddRaw(C(model), mgo.Index{
		Key:         key,
		Unique:      unique,
		ExpireAfter: expireAfter,
		Background:  true,
	})
}
// Add will add an index to the internal index list. Fields that are prefixed
// with a dash will result in an descending index. See the MongoDB documentation
// for more details.