code: func (i *Index) setupField(field *gopilosa.Field) error {
  	fieldName := field.Name()
  	if _, ok := i.recordChans[fieldName]; !ok {
  		err := i.client.EnsureField(field)
  		if err != nil {
  			return errors.Wrapf(err, "creating field '%v'", field)
  		}
  		i.recordChans[fieldName] = newChanRecordIterator()
  		i.importWG.Add(1)
  		go func(fram *gopilosa.Field, cbi chanRecordIterator) {
  			defer i.importWG.Done()
  			err := i.client.ImportField(fram, cbi, gopilosa.OptImportBatchSize(int(i.batchSize)), gopilosa.OptImportRoaring(true))
  			if err != nil {
  				log.Println(errors.Wrapf(err, "starting field import for %v", fieldName))
  			}
  		}(field, i.recordChans[fieldName])
  	}
  	return nil
  }
docs: // setupField ensures the existence of a field in Pilosa,
  // and starts importers for the field.
  // It is not threadsafe - callers must hold i.lock.Lock() or guarantee that they have
  // exclusive access to Index before calling.