Stop words list

From AbleCommerce Wiki
Revision as of 20:13, 29 October 2010 by Loganr (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The AbleCommerce search parser ignores certain words if they are entered as part of a search query. These are known as stop words. SQL Server maintains a list of words that it does not index because generally speaking they would not be unique or helpful. Examples of stop words might be the, of, a, an, and so forth.

Out of the box, AbleCommerce ignores the stop words that are by default in use with SQL Server 2008. However some people may wish to alter the list of words, either to add words or remove them. To do this, you must alter in two locations.

The first location that must be altered is your SQL Server.

SQL Server 2005

In SQL Server 2005, there is only one set of words for all databases. It is a global setting, and in this version was called "noise words". Please refer to the Microsoft documentation on changing the noise words for your server:

http://msdn.microsoft.com/en-us/library/ms142551(SQL.90).aspx

SQL Server 2008

With SQL Server 2008, noise words were replaced by stop words. And the best part is the stop words lists can be database specific instead of global to the whole server. To change a stop words list, see here:

http://msdn.microsoft.com/en-us/library/ms142551(v=SQL.100).aspx

AbleCommerce

If you do change the stop words list, you will need to let the AbleCommerce installation know of the change. Do this by altering the file ~/App_Data/stopwords.txt. This is a simple text file list of words that should be ignored in the search. The list of words should match what is in place on your database.

If you make the proper change in both locations, your searches will ignore your custom list of words. In most cases, this will not be necessary and this should be considered an advanced type of change.