code: func SetupPilosa(hosts []string, indexName string, schema *gopilosa.Schema, batchsize uint) (Indexer, error) {
  	if schema == nil {
  		schema = gopilosa.NewSchema()
  	}
  	indexer := newIndex()
  	indexer.batchSize = batchsize
  	client, err := gopilosa.NewClient(hosts,
  		gopilosa.OptClientSocketTimeout(time.Minute*60),
  		gopilosa.OptClientConnectTimeout(time.Second*60))
  	if err != nil {
  		return nil, errors.Wrap(err, "creating pilosa cluster client")
  	}
  	indexer.client = client
  	indexer.index = schema.Index(indexName)
  	err = client.SyncSchema(schema)
  	if err != nil {
  		return nil, errors.Wrap(err, "synchronizing schema")
  	}
  	for _, field := range indexer.index.Fields() {
  		err := indexer.setupField(field)
  		if err != nil {
  			return nil, errors.Wrapf(err, "setting up field '%s'", field.Name())
  		}
  	}
  	return indexer, nil
  }
docs: // SetupPilosa returns a new Indexer after creating the given fields and starting importers.