Configuring GSA Search
In spring-servlet.xml:
The GSA search controller requires a template for GSA search URLs. This url should be the full URL needed to retrieve XML from the GSA, with "QUERY", "SITE", and "NUM" replacing the values for the search query, search site, and number of items to return, respectively.
Code Block |
---|
|
<!-- GSA search AJAX target -->
<bean name="/gsaSearch" class="org.jasig.portlet.search.mvc.GsaSearchController">
<property name="gsaUrlTemplate" value="http://google.school.edu/search?q=QUERY&site=SITE&num=NUM&btnG=Search&entqr=0&ud=1&sort=date%3AD%3AL%3Ad1&output=xml&oe=UTF-8&ie=UTF-8&client=bluesite_frontend&proxyreload=1"/>
<property name="view" ref="gsaView"/>
</bean>
|
The current version of the tabbed search portlet has only been tested against GSA version 3.2 at the current time. If you're using a different GSA version, you may need to add a new GSA XSLT file and change the stylesheet location to this new XSL transform.
Code Block |
---|
|
<!-- XSLT view for GSA searches -->
<bean id="gsaView" class="org.jasig.portlet.search.mvc.GsaXsltView">
<property name="stylesheetLocation" value="WEB-INF/xsl/gsa-3.2.xsl"/>
<property name="root" value="GSP"/>
</bean>
|
In tabbed-search.xml:
Google Search Appliances may be configured with multiple search sites. You can enter a list of these search sites into the search controller, which will later be displayed to users as a select menu.
Code Block |
---|
|
<!-- main portlet view -->
<bean id="searchController"
class="org.jasig.portlet.search.mvc.TabbedSearchController">
. . .
<!--
Google Search Appliance sites to allow selection from. Only
relevant if the GSA search is enabled above.
-->
<property name="gsaSearchEngines">
<list>
<value>Campus</value>
<value>Library</value>
</list>
</property>
</bean>
|
In messages.properties:
All GSA search sites should be mapped in the messages file in the format
Code Block |
---|
|
gsa.engine.SEARCHNAME=Display Name
|