I've two routes in my express js app
1.router.route('/art/:category/:fieldName/:tag/:count(\\d+)?/:perPage(\\d+)?')
2.router.route('/art/search/:keyword/:count(\\d+)?/:perPage(\\d+)?')
when i access the second route like(art/search/fu/1/1) its always point to route-1
In your route file place route2 before route 1,
since you manage /art/:category before /art/search express assume that search is a category. That's why it point to route 1 and not route 2.