add correct use of static middleware, changed get call in searchservice.