Switch to custom search service
This commit is contained in:
parent
37579c5581
commit
98398a58b6
6 changed files with 10 additions and 8 deletions
|
@ -37,6 +37,7 @@ public class UrlBuilder {
|
|||
LOGIN("/login"),
|
||||
LOGOUT("/logout"),
|
||||
OBJECT_PROPERTY_EDIT("/propertyEdit"),
|
||||
CUSTOMSEARCH("/customsearch"),
|
||||
SEARCH("/search"),
|
||||
SITE_ADMIN("/siteAdmin"),
|
||||
TERMS_OF_USE("/termsOfUse"),
|
||||
|
|
|
@ -304,6 +304,7 @@ public class FreemarkerConfigurationImpl extends Configuration {
|
|||
urls.put("home", UrlBuilder.getHomeUrl());
|
||||
urls.put("about", UrlBuilder.getUrl(Route.ABOUT));
|
||||
urls.put("search", UrlBuilder.getUrl(Route.SEARCH));
|
||||
urls.put("customsearch", UrlBuilder.getUrl(Route.CUSTOMSEARCH));
|
||||
urls.put("termsOfUse", UrlBuilder.getUrl(Route.TERMS_OF_USE));
|
||||
urls.put("login", UrlBuilder.getLoginUrl());
|
||||
urls.put("logout", UrlBuilder.getLogoutUrl());
|
||||
|
|
|
@ -63,11 +63,11 @@ import org.apache.jena.rdf.model.Literal;
|
|||
* Paged search controller that uses the search engine
|
||||
*/
|
||||
|
||||
@WebServlet(name = "CombinedSearchController", urlPatterns = {"/combinedsearch","/combinedsearch.jsp","/combinedfedsearch","/combinedsearchcontroller"} )
|
||||
public class CombinedSearchController extends FreemarkerHttpServlet {
|
||||
@WebServlet(name = "CustomSearchController", urlPatterns = {"/customsearch","/customsearch.jsp","/customfedsearch","/customsearchcontroller"} )
|
||||
public class CustomSearchController extends FreemarkerHttpServlet {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final Log log = LogFactory.getLog(CombinedSearchController.class);
|
||||
private static final Log log = LogFactory.getLog(CustomSearchController.class);
|
||||
|
||||
protected static final int DEFAULT_HITS_PER_PAGE = 25;
|
||||
protected static final int DEFAULT_MAX_HIT_COUNT = 1000;
|
||||
|
@ -581,7 +581,7 @@ public class CombinedSearchController extends FreemarkerHttpServlet {
|
|||
public static class VClassGroupSearchLink extends LinkTemplateModel {
|
||||
long count = 0;
|
||||
VClassGroupSearchLink(String querytext, VClassGroup classgroup, long count) {
|
||||
super(classgroup.getPublicName(), "/search", PARAM_QUERY_TEXT, querytext, PARAM_CLASSGROUP, classgroup.getURI());
|
||||
super(classgroup.getPublicName(), "/customsearch", PARAM_QUERY_TEXT, querytext, PARAM_CLASSGROUP, classgroup.getURI());
|
||||
this.count = count;
|
||||
}
|
||||
|
||||
|
@ -591,7 +591,7 @@ public class CombinedSearchController extends FreemarkerHttpServlet {
|
|||
public static class VClassSearchLink extends LinkTemplateModel {
|
||||
long count = 0;
|
||||
VClassSearchLink(String querytext, VClass type, long count) {
|
||||
super(type.getName(), "/search", PARAM_QUERY_TEXT, querytext, PARAM_RDFTYPE, type.getURI());
|
||||
super(type.getName(), "/customsearch", PARAM_QUERY_TEXT, querytext, PARAM_RDFTYPE, type.getURI());
|
||||
this.count = count;
|
||||
}
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
</ul>
|
||||
<nav id="alpha-browse-container" role="navigation">
|
||||
<h3 class="selected-class"></h3>
|
||||
<#assign alphabet = ["A", "B", "C", "D", "E", "F", "G" "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"] />
|
||||
<#assign alphabet = ["А", "Б", "В", "Г", "Д", "Е", "Ё" "Ж", "З", "И", "Й", "К", "Л", "М", "Н", "О", "П", "Р", "С", "Т", "У", "Ф", "Х", "Ц", "Ч", "Ш", "Щ", "Э", "Ю", "Я" ] />
|
||||
<ul id="alpha-browse-individuals">
|
||||
<li><a href="#" class="selected" data-alpha="all" title="${i18n().select_all}">${i18n().all}</a></li>
|
||||
<#list alphabet as letter>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<fieldset>
|
||||
<legend>${i18n().search_form}</legend>
|
||||
|
||||
<form id="search-form" action="${urls.search}" name="search" role="search" accept-charset="UTF-8" method="POST">
|
||||
<form id="search-form" action="${urls.customsearch}" name="search" role="search" accept-charset="UTF-8" method="POST">
|
||||
<div id="search-field">
|
||||
<input type="text" name="querytext" class="search-vitro" value="${querytext!}" autocapitalize="off" />
|
||||
<input type="submit" value="${i18n().search_button}" class="submit">
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<#-- $This file is distributed under the terms of the license in LICENSE$ -->
|
||||
|
||||
<div id="searchBlock">
|
||||
<form id="searchForm" action="${urls.search}" accept-charset="UTF-8" method="POST">
|
||||
<form id="searchForm" action="${urls.customsearch}" accept-charset="UTF-8" method="POST">
|
||||
<label for="search">${i18n().search_button}</label>
|
||||
<input type="text" name="querytext" id="search" class="search-form-item" value="${querytext!}" size="20" autocapitalize="off" />
|
||||
<input class="search-form-submit" name="submit" type="submit" value="${i18n().search_button}" />
|
||||
|
|
Loading…
Add table
Reference in a new issue