search.jsp revision 1186
0N/ASee LICENSE.txt included in this distribution for the specific
0N/Afile and include the License file at LICENSE.txt.
0N/Ainclude file="projects.jspf"
0N/A QueryBuilder qb = sh.builder;
0N/A url.append("search?");
/* ---------------------- search.jsp start --------------------- */
cfg = PageConfig.get(request);
long starttime = System.currentTimeMillis();
SearchHelper searchHelper = cfg.prepareSearch()
.prepareExec(cfg.getRequestedProjects()).executeQuery().prepareSummary();
if (searchHelper.redirect != null) {
if (searchHelper.errorMsg != null
+ "<a href=\"help.jsp#escaping\">escape special characters</a> "
+ "with <b>\\</b>, or read the <a href=\"help.jsp\">Help</a> "
+ "Error message from parser:<br/>" + searchHelper.errorMsg
.substring(SearchHelper.PARSE_ERROR_MSG.length());
if (searchHelper.errorMsg != null) {
cfg.setTitle("Search Error");
cfg.setTitle("Search");
include file="httpheader.jspf"
include file="pageheader.jspf"
<li><a href="<%= request.getContextPath()
<%-- TODO: jel: IMHO it should be move to menu.jspf as combobox --%>
for (SortOrder o : SortOrder.values()) {
if (searchHelper.order == o) {
%><li><span class="active"><%= o.getDesc() %></span></li><%
%><li><a href="<%= url %><%= o %>"><%= o.getDesc() %></a></li><%
include file="menu.jspf"
if (searchHelper.errorMsg != null) {
} else if (searchHelper.hits == null) {
} else if (searchHelper.hits.length == 0) {
List<Suggestion> hints = searchHelper.getSuggestions();
%><p><font color="#cc0000">Did you mean (for <%= hint.name %>)</font>:<%
for (String word : hint.freetext) {
for (String word : hint.refs) {
for (String word : hint.defs) {
<p> Your search <b><%= searchHelper.query %></b> did not match any files.
int start = searchHelper.start;
int max = searchHelper.maxItems;
int totalHits = searchHelper.totalHits;
buf.append("<span class=\"sel\">").append(label).append("</span>");
buf.append("<a class=\"more\" href=\"s?n=").append(max)
buf.append("<<");
buf.append(">>");
buf.append(label);
buf.append("</a>");
slider = buf.toString();
<p class="pagetitle">Searched <b><%= searchHelper.query
searchHelper.order %></p><%
if (slider.length() > 0) {
Results.prettyPrint(out, searchHelper, start, start + thispage);
<p><b>Completed in <%= System.currentTimeMillis() - starttime
if (slider.length() > 0) {
/* ---------------------- search.jsp end --------------------- */
include file="foot.jspf"