new preferred barcode algorithm
add preferred_barcode to fields returned in search for gallery view