Added code to generate queryArgs based on search arguments