Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Other Technologies / Full-Text Search / March 2007

Tip: Looking for answers? Try searching our database.

FTS and hyphens

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Eric Hoch - 14 Mar 2007 22:06 GMT
Hello,

    Is there any way to work around the behavior of searching for a term
which has hyphens in it? I've seen the article at
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q200043 which
only suggests doing a non-FTS search. Is there no way to transform the
search term so that it will return accurate results?

For example, I have a Products table which has both a code and Name
column which are FTS indexed:

Products
--------
Code    Name
0-0-1    Product 0-0-1
0-0-2    Product 0-0-2

Searching for "Product" returns both rows, but searching for either
"0-0-1" or 0-0-2" return nothing. I've tried several variations on that
search term with no success.

Granted, the example is somewhat contrived, but imagine a table of books
with ISBN as a column, or a table of products with UPC or EAN as a column.

-Eric
Hilary Cotter - 15 Mar 2007 15:19 GMT
This works for me. What language are you searching in and have you removed
all the numbers from your noise word list and rebuilt your catalog?

Signature

Hilary Cotter

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com

> Hello,
>
[quoted text clipped - 21 lines]
>
> -Eric
Eric Hoch - 15 Mar 2007 15:51 GMT
Hello Hilary,

    I hadn't considered that numbers would be in the noise words list. I
removed them and rebuilt my catalog, and the searches are working now.
Thank you!

-Eric

> This works for me. What language are you searching in and have you removed
> all the numbers from your noise word list and rebuilt your catalog?
mEmENT0m0RI - 15 Mar 2007 21:21 GMT
I have simmilar problem searhing for 'Colfed-A' word. When using
CONTAINS (SEARCHCOL ,'"Colfed-A*"'), I get no rows back.
I deleted "A" from the following files: noiseENG.txt, noiseENU.txt and
FULL-repopulated the catalogs with no luck.
Additionaly, I still get the "full-text search condition contained noise
word(s)." warning trying to do CONTAINS (SEARCHCOL ,'"A"').

Any ideas?

Thank you,
Igor
Russell Fields - 15 Mar 2007 21:42 GMT
Igor,

Perhaps you are using the Neutral language and need to edit noiseNEU.txt.
(Not to be confused with noiseENU.txt, which is US English.)  Or else,
ensure that the SEARCHCOL is set to use the proper language.

Also check out your default full-text language setting in server
configuration options.

RLF

>I have simmilar problem searhing for 'Colfed-A' word. When using
> CONTAINS (SEARCHCOL ,'"Colfed-A*"'), I get no rows back.
[quoted text clipped - 9 lines]
>
> *** Sent via Developersdex http://www.developersdex.com ***
Hilary Cotter - 16 Mar 2007 04:22 GMT
This works for me, note that the wildcard extends to all tokens in your
search phrase, and the hyphen is thrown away in searches, so a search on
Colfed-A* will match with Colfed-A, Colfed A, Colfede-Abc, and Colfede Abc,
etc.

I am wondering if your population has finished.

Signature

Hilary Cotter

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com

>I have simmilar problem searhing for 'Colfed-A' word. When using
> CONTAINS (SEARCHCOL ,'"Colfed-A*"'), I get no rows back.
[quoted text clipped - 9 lines]
>
> *** Sent via Developersdex http://www.developersdex.com ***
mEmENT0m0RI - 19 Mar 2007 17:47 GMT
Sorry guys,
I didn't meen to abandon this thread. I wasn't geting emails on this fav
for some reason.
The full string I was seaching for with "CONTAINS (SEARCHCOL ,'
"COLFED-A*"')"  was as follows: "Colfed-A 8-120          ". I ended up
not only removing "A" from the noise words but also the numbers.
So, it works now, but in my mind it still should've found it with
numbers in the noise file.

Thank you for all your help
Russell Fields - 15 Mar 2007 15:29 GMT
Eric,

In Books Online, read about word breakers and noise words.  I don't know
which word breaker treats hyphens as indexed characters instead of a word
breaker (like whitespace), but I do know that single numerals 0 1 2 ... are
in the noise word lists for just about everylanguage.

If you remove the numerals from the noise word list for the language you are
using on your full-text index, then you will find those numbers.

If you actually want the - to be indexed, maybe someone else knows where to
find that word breaker.

RLF
> Hello,
>
[quoted text clipped - 21 lines]
>
> -Eric
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.