More flexible uid searching