Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Old Forums
 CLOSED - General SQL Server
 Full text catalog : Search problem
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

AskSQLTeam
Ask SQLTeam Question

USA
0 Posts

Posted - 04/12/2005 :  08:34:53  Show Profile  Visit AskSQLTeam's Homepage
NetWeb Software writes "Hello All,

We are using SQL Server 2000 as our database. We have implemented full text catalog for the free text searching utility in our application. While testing the implementation of the mentioned catalog based search, we found that the search mechanism igoners '_' (underscore) when specified as the first character of search text. For example, search result for "_option" returns result for "option" and "_" is ignored when there is a valid content that has occurences of "_option" or "_new".

We had removed "_" from the noise word files (noise.enu and noise.eng)of SQL server while implementing the changes. Also, we believe that SQL server catalog based search does not consider "_" as either a Punctuation symbol or a Word breaker.

We are not able to figure out why is the search result for "_option" is returning result for only "option" and ignoring the content "_option". We would appreciate a help on this matter.

For more details on this matter, When we run any one of the following query, we get the same results.

Query-1:
----------
SELECT *
FROM searchtable
WHERE CONTAINS(freetext, '"_option*"')

Query-2:
----------
SELECT *
FROM searchtable
WHERE CONTAINS(freetext, '"option*"')"

DonAtWork
Flowing Fount of Yak Knowledge

2167 Posts

Posted - 04/12/2005 :  10:00:15  Show Profile
I dont see how either of those queries runs. The syntax looks totally wrong. From BOL:
USE Northwind
GO
SELECT CategoryName
FROM Categories
WHERE FREETEXT (Description, 'sweetest candy bread and dry meat' )

So your query should look something like this using FREETEXT:

SELECT * FROM <table>
WHERE FREETEXT(<column>,'_option')

or like so using CONTAINS:

SELECT * FROM <table>
WHERE CONTAINS(<column>,' "_option*" ')

Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000