Adds the association search based on a query parameter.