+<%
+if (rsp != null) {
+ if (found == 0) {
+%>
+
<%= StringEscapeUtils.escapeHtml(query) %> は見つかりませんでした。他の検索語で試してください。
+<%
+ }
+ else {
+%>
+
+<%
+ for (SolrDocument document : rsp.getResults()) {
+ String info = "";
+ if(document.getFirstValue("id") != null){
+ info += document.getFirstValue("id");
+ }
+ if(document.getFirstValue("date") != null){
+ if(info.length() > 0){
+ info += " | ";
+ }
+ info += document.getFirstValue("date");
+ }
+ if(document.getFirstValue("name") != null){
+ if(info.length() > 0){
+ info += " | ";
+ }
+ info += document.getFirstValue("name");
+ }
+
+ String titleStr = "";
+ if (document.getFirstValue("title") != null) {
+ titleStr = (String)document.getFirstValue("title");
+ }
+%>
+
+
<%= info %>
+
+<%
+ if(!StringUtils.isEmpty(query)){
+ String contents = "";
+ boolean first = true;
+ if (document.getFieldValues("contents") != null){
+ int i = 10;
+ for (Object line : document.getFieldValues("contents")) {
+ i--;
+ if (i < 0) {
+ break;
+ }
+ String str = line.toString();
+ if ((str != null) && (str.trim().length() > 0)) {
+ if (!first) {
+ contents += " / ";
+ }
+ else {
+ first = false;
+ }
+ contents += line.toString();
+ }
+ }
+ }
+%>
+
<%= StringEscapeUtils.escapeHtml(contents) %>
+<%
+ }
+%>
+
+<%
+ String summary = "";
+ Map
> highlighting = rsp.getHighlighting().get(document.getFirstValue("url"));
+ boolean first = true;
+ for (String field : SearchUtil.getSummaryHighlightFields()){
+ if (highlighting.get(field) != null){
+ for (String text : highlighting.get(field)){
+ if (!first) {
+ summary += "...";
+ }
+ else {
+ first = false;
+ }
+ summary += text;
+ }
+ }
+ }
+%>
+ <%= summary %>
+
+
+<%
+ }
+ }
+%>
+
+
+
+ <%-- facet fields --%>
+<%
+ //for (FacetField facetField : rsp.getFacetFields()) {
+%>
+
+<%
+ //}
+%>
+
+ <%-- facet queries --%>
+
+
+
+
+<%
+}
+%>
+
+
+
+