Friday, March 23, 2012

how do I ignore punctuation?

Just as the title suggests, how do I ignore punctuation in an SQL query using full txt searching?

Say if I wanted to search on:

O'brien
or
Mary's Hat.

I would expect that the search engine would look for:
Obrien OR O'brien
and
Marys hat OR Mary's Hat.

Im using SQL 2005

This is handled by the iFilters mechanism, using a "word breaker". Punctuation may not react the way you think in this example, because of possessives, proper names, and contractions. You can start your search by reading more about word breakers by pasting this link in Books Online in the URL Bar:

ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/fulltxt9/html/d4bdd16b-a2db-4101-a946-583d1c674229.htm

No comments:

Post a Comment