updated search funtion to add search terms to terms object & query fragment the same as facets