// While routing requests to the redirector, extract the "kwd" query
// parameter. For instance :
// http://localhost:8111/search?kwd=myKeyword1+myKeyword2
// will be routed to
// http://www.google.com/search?q=site:mysite.org+myKeyword1%20myKeyword2
Extractor extractor = new Extractor(getContext(), redirector);
extractor.extractFromQuery("keywords", "kwd", true);
// Attach the extractor to the router
router.attach("/search", extractor);
// Return the root router