beautypg.com

Searching collections, Enabling users to search multiple collections – Google Search Appliance Creating the Search Experience User Manual

Page 84

background image

Google Search Appliance: Creating the Search Experience

Best Practices

84

For more information about this topic, refer to Adding a Menu to Search by Collection in Customizing
the User Interface.

The maximum number of collections for a search appliance is 200. Having more than this number of
collections can cause serving to fail. The solution for this problem is to reset the index.

The search appliance allows you to create an unlimited number of collections for a search index. To
create a collection, use the Crawl and Index > Collections page in the Admin Console. For information
about using this page to create a collection, see Help Center > Crawl and Index > Collections.

Searching Collections

Individual collection search results have the same relevance ranking as full index searches. Only the
content searched differs as it is restricted to the individual collection's content.

To restrict searches to a collection that you have defined, add the following to the URL of your search
query:

&site=COLLECTION_NAME

The following examples show search queries for searching collections.

A search for “vacation” in the collection Human_Resources:

http://www.google.com/search?
q=vacation&output=xml&client=yoursite&site=human_resources

This search returns vacation results specifically from URLs in the Human_Resources collection.

A search for “product” in the collections Development and Marketing:

http://www.google.com/search?q=product&output=xml&client=yoursite&site=
(development)|(marketing)

This search for “product” returns results from either the Development or Marketing collections.

For more information, see the Filtering section of the Search Protocol Reference.

Enabling Users to Search Multiple Collections

Once you have created collections, determine if users will ever want to search multiple collections at the
same time. For example, you might want to enable a sales person to search the “Marketing” collection
and the “Sales” collection. The Google Search Appliance allows search within multiple collections by
using the “|” (OR) or “.” (AND) operator.

To specify the collection that you want to search, you set the site parameter on the GET request. The
following example shows a GET request where the collection specified is one named “'all_content.”

http://search.corp.mycompany.com/search?q=query+string

&site=all_content
&client=default_frontend
&output=xml_no_dtd
&proxystylesheet=default_frontend