<%@ page import="org.opencms.main.*, org.opencms.search.*, org.opencms.file.*, org.opencms.jsp.*, org.opencms.workplace.administration.*, org.opencms.workplace.*, java.util.*, java.io.*" %> <%! public static String getStackTrace(Exception e) { Writer result = new StringWriter(); PrintWriter printWriter = new PrintWriter(result); e.printStackTrace(printWriter); return result.toString(); } %><% // initialize the workplace class CmsDialog wp = new CmsDialog(pageContext, request, response); // Create a JSP action element CmsJspActionElement cms = wp.getJsp(); // Get the search manager CmsSearchManager searchManager = OpenCms.getSearchManager(); %> <% search.init(cms.getCmsObject()); %> <%= wp.htmlStart(null) %> <%= wp.bodyStart("dialog", null) %> <%= wp.dialogStart() %> <%= wp.dialogContentStart(wp.key("icon.updateindex")) %> <% List result = search.getSearchResult(); if (result == null) { %> <% if (search.getLastException() != null) { %>

Error:

<%= search.getLastException().toString() %> 
<%= getStackTrace(search.getLastException()) %> 
<% } %>
Query:
Index:
Fields: Title
Keywords
Description
Content

<% } else { %> <% ListIterator iterator = result.listIterator(); %> <%= result.size() %> Results found for query <<%= search.getQuery() %>> in fields <%= search.getFields() %>. <% int i = 0; while (iterator.hasNext()) { i++; CmsSearchResult entry = (CmsSearchResult)iterator.next(); %>

<%= i %>. <%= entry.getTitle() %> (<%= entry.getScore() %>%)

<%= entry.getPath() %>
Keywords
<%= entry.getKeywords() %>
Excerpt
<%= entry.getExcerpt() %>
Description
<%= entry.getDescription() %>
Last modified
<%= entry.getDateLastModified() %> <% } } %> <%= wp.dialogContentEnd() %> <%= wp.dialogEnd() %> <%= wp.bodyEnd() %> <%= wp.htmlEnd() %>