sorting and finding matches for collection fields