code: func (cmd *ImportCommand) importValues(ctx context.Context, useColumnKeys bool, vals []pilosa.FieldValue) error {
  	logger := log.New(cmd.Stderr, "", log.LstdFlags)
  
  	// If keys are used, all values are sent to the primary translate store (i.e. coordinator).
  	if useColumnKeys {
  		logger.Printf("importing keyed values: n=%d", len(vals))
  		if err := cmd.client.ImportValueK(ctx, cmd.Index, cmd.Field, vals); err != nil {
  			return errors.Wrap(err, "importing keys")
  		}
  		return nil
  	}
  
  	// Group vals by shard.
  	logger.Printf("grouping %d vals", len(vals))
  	valsByShard := http.FieldValues(vals).GroupByShard()
  
  	// Parse path into FieldValues.
  	for shard, vals := range valsByShard {
  		if cmd.Sort {
  			sort.Sort(http.FieldValues(vals))
  		}
  
  		logger.Printf("importing shard: %d, n=%d", shard, len(vals))
  		if err := cmd.client.ImportValue(ctx, cmd.Index, cmd.Field, shard, vals, pilosa.OptImportOptionsClear(cmd.Clear)); err != nil {
  			return errors.Wrap(err, "importing values")
  		}
  	}
  
  	return nil
  }
docs: // importValues sends batches of FieldValues to the server.