The best and most effective option...
Is a combination of both types of sweepers. An upright for carpets and rugs and a canister for everything else.
In my experience the best uprights for carpets and rugs are Direct Air machines like the Kirby G series and Royal metal uprights. No other upright will deep clean your carpets better than either of these two machines. Remember: It's not Suction that cleans carpets, It's Airflow and Agitation that deep cleans the best and a canister with a powered floor nozzle just doesn't cut it when it comes to deep cleaning dirt and sand embedded deep in your carpets.
As far as above the floor cleaning goes, just about any canister that has good suction and good tools will do just fine.
My personal combo that I use in my home is the small lightweight but powerful Eureka Mighty Mite canister that also works in Blower mode. For my carpeted rooms I use either my Heritage II Legend or my Kirby Sentria. The Sentria also doubles as a very effective carpet Shampoo system that I use 2 or 3 times a year.