Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

    <!-- 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&amp;site=SITE&amp;num=NUM&amp;btnG=Search&amp;entqr=0&amp;ud=1&amp;sort=date%3AD%3AL%3Ad1&amp;output=xml&amp;oe=UTF-8&amp;ie=UTF-8&amp;client=bluesite_frontend&amp;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
xml
xml

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

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

gsa.engine.SEARCHNAME=Display Name