beautypg.com

Using stopwords – Google Search Appliance Creating the Search Experience User Manual

Page 62

background image

Google Search Appliance: Creating the Search Experience

Best Practices

62

Using Stopwords

A stopword is a search term that is ignored by the search appliance. Examples of stopwords include “to,”
“a,” and “the.” However, if a stopword is the only keyword in a query, it is not ignored. For example, if
"salary" is a stopword is and a user submits a query where "salary" is the only keyword, the query will
execute and display results. But if a user searches for "my salary," "salary" is ignored.

A stopwords file is a text file of three megabytes or less, containing a case-insensitive list of one or more
alphanumeric stopwords. By default, the search appliance has 26 files of stopwords for supported
languages. For a list of the default stopwords files, see the files listed under Stopwords Data on the
Serving > Query Settings page. Of these files, two are enabled by default: Google_Default_Stopwords
and Google_English_Stopwords. Additionally, you can create and upload your own stopwords files.

To create a Stopwords file:

1.

Create a text (.txt) file.

2.

If the file will contain accented characters and you have not already checked your editor's ability to
save a file with UTF-8 encoding, do so now. As an example, if you are using Notepad, do this:

From the File menu, choose Save As.

Check that the Save options include Encoding, as well as Name and File Type.

Pull down the Encoding menu and choose UTF-8.

3.

Edit the file as follows:

Put one word on each line. Blank lines are ignored.

Use only alphanumeric characters. Spaces are not allowed.

Use the pound sign (#) to start a comment line.

4.

Save the file. If the file has accented characters, save it with UTF-8 encoding.

The following example shows an excerpt from the contents of the Google_Default_stopwords.txt
file. Each of the following words is ignored in a search query.

the
of
to
in
for
is
on
that
by
with
this
be
it
www
are
...

For information about uploading a stopwords file, click Help Center > Serving > Query Settings in the
Admin Console.

For a stopwords file for a particular language to take effect, searches must be restricted to the same
language. For example, if you upload and enable a stopwords file for French, searches must be
restricted to French for those stopwords to take effect.

Searches can be restricted to a particular language in either of the following ways: