code: func (m *Main) Run() error {
  	if m.Seed == -1 {
  		m.Seed = time.Now().UnixNano()
  	}
  
  	src := fake.NewUserSource(m.Seed, m.Num)
  
  	schema := gopilosa.NewSchema()
  	idx := schema.Index("users")
  	idx.Field("age", gopilosa.OptFieldTypeInt(0, 112))
  	idx.Field("lastname", gopilosa.OptFieldTypeSet(gopilosa.CacheTypeRanked, 50000), gopilosa.OptFieldKeys(true))
  	idx.Field("firstname", gopilosa.OptFieldTypeSet(gopilosa.CacheTypeRanked, 10000), gopilosa.OptFieldKeys(true))
  	idx.Field("title", gopilosa.OptFieldTypeSet(gopilosa.CacheTypeRanked, 1000), gopilosa.OptFieldKeys(true))
  	idx.Field("allergies", gopilosa.OptFieldTypeSet(gopilosa.CacheTypeRanked, 1000), gopilosa.OptFieldKeys(true))
  
  	indexer, err := pdk.SetupPilosa(m.PilosaHosts, m.Index, schema, m.BatchSize)
  	if err != nil {
  		return errors.Wrap(err, "setting up Pilosa")
  	}
  
  	for rec, err := src.Record(); err == nil; rec, err = src.Record() {
  		pr := parseUserRecord(rec.(*fake.User))
  		ingestPilosaRecord(indexer, pr)
  	}
  	return errors.Wrap(indexer.Close(), "closing indexer")
  }
docs: // Run begins generating data and ingesting it to Pilosa.