Tabbed Search Portlet Configuration - GSA

Configuring GSA Search

In spring-servlet.xml:

The GSA search controller requires configuration to build URLs for GSA searches. You will need to configure the base URL, some parameters, and the name of the stylesheet you'd like displayed when users click the "more results" link that goes to the GSA itself.

<!-- GSA search AJAX target -->    
<bean name="/gsaSearch" class="org.jasig.portlet.search.mvc.GsaSearchController">
    <property name="googleBaseUrl" value="http://google.school.edu"/>
    <property name="googleParameters">
        <map>
            <entry key="output" value="xml_no_dtd"/>
            <entry key="oe" value="UTF-8"/>
            <entry key="ie" value="UTF-8"/>
            <entry key="client" value="university_frontend"/>
        </map>
    </property>
    <property name="googleStylesheetName" value="university_frontend"/>
    <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. Chances are that the supplied stylesheet will just work, but 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.

<!-- 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. If the list is omitted, the select menu will not be displayed, and no site selection will be sent to the GSA. If only one option is present, the form will submit that value from a hidden input field.

<!-- 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

gsa.engine.SEARCHNAME=Display Name