search.jsp revision 8d5daad4d9da04018b562f0dd12044f5f53c1a66
ac4e70ff8955669341f435bc0a734a17c01af124Mark Andrews<%--
205c10066a0acfeac52d1a135671f41d207b8557Automatic Updater$Id$
205c10066a0acfeac52d1a135671f41d207b8557Automatic Updater
1167fc7904c5f0a472f8df207ac46dd52c7f1ec8Automatic UpdaterCDDL HEADER START
0c39b3ed9409ecb277d5e32fa763a4e4d6598df8Automatic Updater
46da3117812814a29432a8d9a9ccf8acdbfdadceAutomatic UpdaterThe contents of this file are subject to the terms of the
2bb3422dc683c013db7042f5736240de6b86f182Automatic UpdaterCommon Development and Distribution License (the "License").
cd0aa2d941d1438fabb5337f1f38c49478edf71dAutomatic UpdaterYou may not use this file except in compliance with the License.
90ff38a0d8deaf5f9c2aa5916d99b2e572d28738Automatic Updater
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSee LICENSE.txt included in this distribution for the specific
ac4e70ff8955669341f435bc0a734a17c01af124Mark Andrewslanguage governing permissions and limitations under the License.
6c6a121295b30772cbf3dd75a51fb9d883051a0eAutomatic Updater
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonWhen distributing Covered Code, include this CDDL HEADER in each
9cd5eb6fe0f26d65724b99216cb31dcdd12e4afdAutomatic Updaterfile and include the License file at LICENSE.txt.
e171a4137c6ba348957e61b7c4c3541493c0da02Automatic UpdaterIf applicable, add the following below this CDDL HEADER, with the
e171a4137c6ba348957e61b7c4c3541493c0da02Automatic Updaterfields enclosed by brackets "[]" replaced with your own identifying
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrewsinformation: Portions Copyright [yyyy] [name of copyright owner]
58be84825d7f5de30e50eb7206b37227ecd8055bAutomatic Updater
3cc98b8ecedcbc8465f1cf2740b966b315662430Automatic UpdaterCDDL HEADER END
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsCopyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
e171a4137c6ba348957e61b7c4c3541493c0da02Automatic UpdaterPortions Copyright 2011 Jens Elkner.
831f79c4310a7d38fc3475ccfff531b2b2535641Automatic Updater
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews--%><%@page session="false" errorPage="error.jsp" import="
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updaterorg.opensolaris.opengrok.search.Results,
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrewsorg.opensolaris.opengrok.web.SearchHelper,
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updaterorg.opensolaris.opengrok.web.SortOrder,
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssonorg.opensolaris.opengrok.web.Suggestion"
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater%><%@
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssoninclude file="projects.jspf"
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater%><%!
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater private StringBuilder createUrl(SearchHelper sh, boolean menu) {
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt StringBuilder url = new StringBuilder(64);
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater QueryBuilder qb = sh.builder;
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater if (menu) {
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt url.append("search?");
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater } else {
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater Util.appendQuery(url, "sort", sh.order.toString());
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater }
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt if (qb != null) {
2d2dc37599979c83495510f8af8d1756753aa2c5Automatic Updater Util.appendQuery(url, "q", qb.getFreetext());
2d2dc37599979c83495510f8af8d1756753aa2c5Automatic Updater Util.appendQuery(url, "defs", qb.getDefs());
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt Util.appendQuery(url, "refs", qb.getRefs());
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater Util.appendQuery(url, "path", qb.getPath());
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater Util.appendQuery(url, "hist", qb.getHist());
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater Util.appendQuery(url, "type", qb.getType());
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater }
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater if (sh.projects != null && sh.projects.size() != 0) {
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic Updater Util.appendQuery(url, "project", cfg.getRequestedProjectsAsString());
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic Updater }
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater return url;
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater }
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater%><%
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater/* ---------------------- search.jsp start --------------------- */
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark Andrews{
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark Andrews cfg = PageConfig.get(request);
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark Andrews
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington String lastEditedDisplayMode = config.getInitParameter("lastEditedDisplayMode");
9cd5eb6fe0f26d65724b99216cb31dcdd12e4afdAutomatic Updater if (lastEditedDisplayMode != null) {
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews if(!(lastEditedDisplayMode.compareTo("true") == 0 ||
129090f0f6f91753b4a085ab635e28549fd018adAutomatic Updater lastEditedDisplayMode.compareTo("1") == 0 ||
129090f0f6f91753b4a085ab635e28549fd018adAutomatic Updater lastEditedDisplayMode.isEmpty())){
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews cfg.setLastEditedDisplayMode(false);
d7a77415c13bb2fc2d1acb857486d97e4466e3b8Automatic Updater }
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews }
e311702a890f6a33181b0211ff38b571f398a97aAutomatic Updater
80faf1588895fd26490f82f95a7a1b771df1c324Automatic Updater long starttime = System.currentTimeMillis();
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
1a06700908f5a1d9f4a8d51285a0fd971e2f9117Automatic Updater SearchHelper searchHelper = cfg.prepareSearch()
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews .prepareExec(cfg.getRequestedProjects()).executeQuery().prepareSummary();
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic Updater if (searchHelper.redirect != null) {
693c4232dfdffaff672197d4b9fea944c64cf80aAutomatic Updater response.sendRedirect(searchHelper.redirect);
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews }
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater if (searchHelper.errorMsg != null) {
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson cfg.setTitle("Search Error");
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater } else {
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater cfg.setTitle("Search");
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews }
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater response.addCookie(new Cookie("OpenGrokSorting", URLEncoder.encode(searchHelper.order.toString(), "utf-8")));
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson%><%@
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updaterinclude file="httpheader.jspf"
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater%><body>
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updater<div id="page">
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updater <div id="whole_header">
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews <div id="header"><%@
b1265b5a06df36d490d4bdf54284fb133a1f5a84Automatic Updater
9174e44c14b1cb91a651fa1dc29470438c246ab9Automatic Updaterinclude file="pageheader.jspf"
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont%>
0c39b3ed9409ecb277d5e32fa763a4e4d6598df8Automatic Updater </div>
0c39b3ed9409ecb277d5e32fa763a4e4d6598df8Automatic Updater <div id="Masthead"></div>
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont <div id="bar">
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews <ul>
f9119ad8f6114b2255e7545bf5cd187f4db0a89bAutomatic Updater <li><a href="<%= request.getContextPath()
e23256e740b238bddb4ba41ffac5f81a01c92245Automatic Updater %>/"><span id="home"></span>Home</a></li>
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews </ul>
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews <%-- TODO: jel: IMHO it should be move to menu.jspf as combobox --%>
08e3b6797706a13054bad749dea04e94b514b8e7Automatic Updater <div id="sortfield">
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updater <label for="sortby">Sort by</label>
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews <ul id="sortby"><%
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews StringBuilder url = createUrl(searchHelper, true).append("&amp;sort=");
b29e5c56eb74a6de1a84c29879afc90ffc6b1436Automatic Updater for (SortOrder o : SortOrder.values()) {
418cc932318b1d67f88a36904d88d8a5a0a2ba09Automatic Updater if (searchHelper.order == o) {
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews %><li><span class="active"><%= o.getDesc() %></span></li><%
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews } else {
0977f3f39ef6728516be7976452b9122c8f5607aAutomatic Updater %><li><a href="<%= url %><%= o %>"><%= o.getDesc() %></a></li><%
ae7e54b14c946e0984c191554db9abb4893f9349Automatic Updater }
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews }
0c39b3ed9409ecb277d5e32fa763a4e4d6598df8Automatic Updater %></ul>
0c39b3ed9409ecb277d5e32fa763a4e4d6598df8Automatic Updater </div>
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater </div>
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic Updater <div id="menu"><%@
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater
fe80a4909bf62b602feaf246866e9d29f7654194Automatic Updaterinclude file="menu.jspf"
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater%>
fe80a4909bf62b602feaf246866e9d29f7654194Automatic Updater </div>
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater </div>
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater <div id="results"><%
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson // TODO spellchecking cycle below is not that great and we only create
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater // suggest links for every token in query, not for a query as whole
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews if (searchHelper.errorMsg != null) {
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson %><h3>Error</h3><p class="pagetitle"><%
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updater if (searchHelper.errorMsg.startsWith((SearchHelper.PARSE_ERROR_MSG))) {
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updater %><%= Util.htmlize(SearchHelper.PARSE_ERROR_MSG) %>
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updater <br/>You might try to enclose your search term in quotes,
133e6d43fa82e80d3798be4de00f4540f485ec6cAutomatic Updater <a href="help.jsp#escaping">escape special characters</a>
133e6d43fa82e80d3798be4de00f4540f485ec6cAutomatic Updater with <b>\</b>, or read the <a href="help.jsp">Help</a>
133e6d43fa82e80d3798be4de00f4540f485ec6cAutomatic Updater on the query language. Error message from parser:<br/>
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater <%= Util.htmlize(searchHelper.errorMsg.substring(
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson SearchHelper.PARSE_ERROR_MSG.length())) %><%
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater } else {
4104e236f71eb5108fcfda6711878a97f6f4a8e7Automatic Updater %><%= Util.htmlize(searchHelper.errorMsg) %><%
27794bebe2634b5ac374e78972649c79300b876aAutomatic Updater }%></p><%
27794bebe2634b5ac374e78972649c79300b876aAutomatic Updater } else if (searchHelper.hits == null) {
0ce87e5749aabb8eef1e0a37e4bd6e6ffa1d7196Automatic Updater %><p class="pagetitle">No hits</p><%
0ce87e5749aabb8eef1e0a37e4bd6e6ffa1d7196Automatic Updater } else if (searchHelper.hits.length == 0) {
27794bebe2634b5ac374e78972649c79300b876aAutomatic Updater List<Suggestion> hints = searchHelper.getSuggestions();
be63e68c516117af6af8850904e46a89c7d4423eAutomatic Updater for (Suggestion hint : hints) {
ede7b1df75ac53a9530bbbc9fc9db534cab82f44Automatic Updater %><p class="suggestions"><font color="#cc0000">Did you mean (for <%= hint.name %>)</font>:<%
c453a50776145e9c1c3fc9c846cfa11f42505081Automatic Updater if (hint.freetext!=null) {
f4029eb7463e99df00618de89f0bee5ac062a237Automatic Updater for (String word : hint.freetext) {
19b3dc94bce93fa76bd7e066f9298630dbc9dcb4Automatic Updater %> <a href="search?q=<%= Util.URIEncode(word) %>"><%=
d145b64cacc8d9cda51f9924ec70cd4661c3e2cfAutomatic Updater Util.htmlize(word) %></a> &nbsp; <%
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater }
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater }
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater if (hint.refs!=null) {
f4029eb7463e99df00618de89f0bee5ac062a237Automatic Updater for (String word : hint.refs) {
e628576d3b3d91c8954679077f4c208f1e43b433Automatic Updater %> <a href="search?refs=<%= Util.URIEncode(word) %>"><%=
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater Util.htmlize(word) %></a> &nbsp; <%
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater }
bc0a53583d92309bebcf93c408e2f3247ebd3d3cAutomatic Updater }
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater if (hint.defs!=null) {
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater for (String word : hint.defs) {
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater %> <a href="search?defs=<%= Util.URIEncode(word) %>"><%=
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater Util.htmlize(word) %></a> &nbsp; <%
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater }
7f79131f9a8e804b93c57f3c679065cce878b726Automatic Updater }
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater %></p><%
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater }
9b1207058e739f5267dd1565cd04cc93092f068fAutomatic Updater %>
c453a50776145e9c1c3fc9c846cfa11f42505081Automatic Updater <p class="pagetitle"> Your search <b><%
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater Util.htmlize(searchHelper.query.toString(), out); %></b>
19b3dc94bce93fa76bd7e066f9298630dbc9dcb4Automatic Updater did not match any files.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater <br/> Suggestions:<br/>
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater </p>
7f94d9a8162c9a96b56e66176702b66e79d8e1a2Automatic Updater <ul>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater <li>Make sure all terms are spelled correctly.</li>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater <li>Try different keywords.</li>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater <li>Try more general keywords.</li>
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater <li>Use 'wil*' cards if you are looking for partial match.</li>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater </ul>
71bd43eebd9d6e42dbcae62b730f5b6508d5acd8Automatic Updater <p><b>Completed in <%= System.currentTimeMillis() - starttime
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater %> milliseconds</b></p>
7262eb86f2b465822206122921e2f357218f0cfdAutomatic Updater <%
96ea71632887c58a9d00f47eb318bf76b35903c3Mark Andrews } else {
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater // We have a lots of results to show: create a slider for
9cd5eb6fe0f26d65724b99216cb31dcdd12e4afdAutomatic Updater String slider = "";
bbb069be941f649228760edcc241122933c066d2Automatic Updater int thispage; // number of items to display on the current page
9cd5eb6fe0f26d65724b99216cb31dcdd12e4afdAutomatic Updater int start = searchHelper.start;
4cda4fd158d6ded5586bacea8c388445d99611eaAutomatic Updater int max = searchHelper.maxItems;
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews int totalHits = searchHelper.totalHits;
9cd5eb6fe0f26d65724b99216cb31dcdd12e4afdAutomatic Updater if (searchHelper.maxItems < searchHelper.totalHits) {
80faf1588895fd26490f82f95a7a1b771df1c324Automatic Updater StringBuilder buf = new StringBuilder(4096);
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews thispage = (start + max) < totalHits ? max : totalHits - start;
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater StringBuilder urlp = createUrl(searchHelper, false);
e628576d3b3d91c8954679077f4c208f1e43b433Automatic Updater int labelStart = 1;
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews int sstart = start - max * (start / max % 10 + 1) ;
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews if (sstart < 0) {
c453a50776145e9c1c3fc9c846cfa11f42505081Automatic Updater sstart = 0;
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews labelStart = 1;
f7c88d61cc1ad2435b0b7cfaedfc9d5248c0be25Automatic Updater } else {
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews labelStart = sstart / max + 1;
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater }
957a8884fb712885cdd8ef0474f5ff95ddc46b20Automatic Updater int label = labelStart;
b109432c3a939bff66a463be86c371bd88efe3aaAutomatic Updater int labelEnd = label + 11;
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater for (int i = sstart; i < totalHits && label <= labelEnd; i+= max) {
995eaa289ba9709c64ef89b3776e53c36adc0010Automatic Updater if (i <= start && start < i + max) {
9cd5eb6fe0f26d65724b99216cb31dcdd12e4afdAutomatic Updater buf.append("<span class=\"sel\">").append(label).append("</span>");
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater } else {
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington buf.append("<a class=\"more\" href=\"s?n=").append(max)
9cd5eb6fe0f26d65724b99216cb31dcdd12e4afdAutomatic Updater .append("&amp;start=").append(i).append(urlp).append("\">");
cf7e98f59148b559946a7f1ca728471374f1eef3Automatic Updater if (label == labelStart && label != 1) {
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic Updater buf.append("&lt;&lt");
bf9b61c7904437745aeeb0f7d5036b35dad2a8a5Automatic Updater } else if (label == labelEnd && i < totalHits) {
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater buf.append("&gt;&gt;");
cf7e98f59148b559946a7f1ca728471374f1eef3Automatic Updater } else {
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater buf.append(label);
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson }
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater buf.append("</a>");
361bec4bdec45042897fb479b7071cd05bbd56b9Automatic Updater }
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater label++;
48b36fa08b2b5bc0d552dc2a4425b3f7007b3d59Automatic Updater }
e5fe07a7ebff18f7ed4ac434b37daff6c8ee5d5bAutomatic Updater slider = buf.toString();
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington } else {
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater // set the max index to max or last
3857cb6fcabeb79d85de4b3e3e4ab99912b701f8Mark Andrews thispage = totalHits - start;
129090f0f6f91753b4a085ab635e28549fd018adAutomatic Updater }
7858b0168b866c0c2878fc4ea31fb5e581c1a6a9Automatic Updater %>
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews <p class="pagetitle">Searched <b><%
9174e44c14b1cb91a651fa1dc29470438c246ab9Automatic Updater Util.htmlize(searchHelper.query.toString(), out);
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson %></b> (Results <b> <%= start + 1 %> - <%= thispage + start
e2caa7536302de34de6cc04025abcd53dc3a499aAutomatic Updater %></b> of <b><%= totalHits %></b>) sorted by <%=
56e7dc0c24b04210dcbffb180a9e35644fb820daAutomatic Updater searchHelper.order.getDesc() %></p><%
7d12a6b412fe47e6d6582923fd6954ab8cd0baebAutomatic Updater if (slider.length() > 0) {
8292deab031e7599cd7622aa7675fbe139ca6095Mark Andrews %>
0b57424d28c9a67018107133f9fbc0a7dcf057e2Mark Andrews <p class="slider"><%= slider %></p><%
0b57424d28c9a67018107133f9fbc0a7dcf057e2Mark Andrews }
0b57424d28c9a67018107133f9fbc0a7dcf057e2Mark Andrews %>
ca35524ce2b57e6f1b261d23565d1288a355d12fAutomatic Updater <table><%
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews Results.prettyPrint(out, searchHelper, start, start + thispage);
b109432c3a939bff66a463be86c371bd88efe3aaAutomatic Updater %>
7d12a6b412fe47e6d6582923fd6954ab8cd0baebAutomatic Updater </table>
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews <p><b>Completed in <%= System.currentTimeMillis() - starttime
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews %> milliseconds</b></p><%
3351ccbd5c1961404044f8273d54dad405f53960Mark Andrews if (slider.length() > 0) {
7d12a6b412fe47e6d6582923fd6954ab8cd0baebAutomatic Updater %>
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews <p class="slider"><%= slider %></p><%
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews }
3351ccbd5c1961404044f8273d54dad405f53960Mark Andrews %>
7d12a6b412fe47e6d6582923fd6954ab8cd0baebAutomatic Updater </div><%
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews }
0b57424d28c9a67018107133f9fbc0a7dcf057e2Mark Andrews searchHelper.destroy();
7d12a6b412fe47e6d6582923fd6954ab8cd0baebAutomatic Updater}
0b57424d28c9a67018107133f9fbc0a7dcf057e2Mark Andrews/* ---------------------- search.jsp end --------------------- */
e8fc8c884b44371784805e1e0d3100da403dd3f1Automatic Updater%><%@
e8fc8c884b44371784805e1e0d3100da403dd3f1Automatic Updater
e8fc8c884b44371784805e1e0d3100da403dd3f1Automatic Updaterinclude file="foot.jspf"
e8fc8c884b44371784805e1e0d3100da403dd3f1Automatic Updater
e8fc8c884b44371784805e1e0d3100da403dd3f1Automatic Updater%>
e8fc8c884b44371784805e1e0d3100da403dd3f1Automatic Updater