}
private boolean handleGet(HttpServletRequest request, HttpServletResponse response, Repository db, String pattern) throws CoreException, IOException,
ServletException {
Index index = new Index(null /* not needed */, db, pattern);
ObjectStream stream = index.toObjectStream();
if (stream == null) {
String msg = NLS.bind("{0} not found in index", pattern); //$NON-NLS-1$
return statusHandler.handleRequest(request, response, new ServerStatus(IStatus.OK, HttpServletResponse.SC_NOT_FOUND, msg, null));
}
IOUtilities.pipe(stream, response.getOutputStream(), true, false);