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 / February 2008

Tip: Looking for answers? Try searching our database.

FULL TEXT SEARCH  PROBLEM

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
in da club - 01 Feb 2008 08:02 GMT
I have a table which has a record  T17.1.516.32

I try
SELECT Urun_Ad as guUrun_Ad

FROM TBL_URUNLER

WHERE ( (CONTAINS(Urun_Ad, '"*t17.1.516.32*"' )

))

it returns T17.1.516.32

i try

SELECT Urun_Ad as guUrun_Ad

FROM TBL_URUNLER

WHERE ( (CONTAINS(Urun_Ad, '"*1.516.32*"' )

))

it returns

T17.1.516.32

and i try

SELECT Urun_Ad as guUrun_Ad

FROM TBL_URUNLER

WHERE ( (CONTAINS(Urun_Ad, '"*516.32*"' )

))

it returns nothing. How can i solve the problem. i need like operator task
in fts.
Hilary Cotter - 05 Feb 2008 19:25 GMT
you need to prepend a noise word on your query, ie:

use pubs
GO
create table fttable (pk int not null identity constraint fttablepk
primary key,
charcol char(200))
GO
insert into fttable values('516.32')
insert into fttable values('T17.1.516.32')
GO
sp_fulltext_database 'enable'
GO
create fulltext catalog test as default
GO
create fulltext index on fttable(charcol) key index fttablepk
GO
select * from fttable where contains(*,'516.32')--hit to 516.32
select * from fttable where contains(*,'1.516.32.1')--hit to
T17.1.516.32
select * from fttable where contains(*,'1.516.32')--hit to
T17.1.516.32

> I have a table which has a record  T17.1.516.32
>
[quoted text clipped - 35 lines]
> it returns nothing. How can i solve the problem. i need like operator task
> in fts.
in da club - 06 Feb 2008 07:48 GMT
I deleted all noise words and chars in noiseXX..txt files. I know that it is
not a noise word issue.

"Hilary Cotter" <hilary.cotter@gmail.com>, haber iletisinde sunlari
yazdi:fced9e28-2f5a-4111-b32a-7db63180edf0@q77g2000hsh.googlegroups.com...
you need to prepend a noise word on your query, ie:

use pubs
GO
create table fttable (pk int not null identity constraint fttablepk
primary key,
charcol char(200))
GO
insert into fttable values('516.32')
insert into fttable values('T17.1.516.32')
GO
sp_fulltext_database 'enable'
GO
create fulltext catalog test as default
GO
create fulltext index on fttable(charcol) key index fttablepk
GO
select * from fttable where contains(*,'516.32')--hit to 516.32
select * from fttable where contains(*,'1.516.32.1')--hit to
T17.1.516.32
select * from fttable where contains(*,'1.516.32')--hit to
T17.1.516.32

On Feb 1, 3:02 am, "in da club" <s> wrote:
> I have a table which has a record T17.1.516.32
>
[quoted text clipped - 35 lines]
> it returns nothing. How can i solve the problem. i need like operator task
> in fts.
Daniel Crichton - 06 Feb 2008 11:10 GMT
in wrote  on Wed, 6 Feb 2008 09:48:07 +0200:

> I deleted all noise words and chars in noiseXX..txt files. I know that
> it is  not a noise word issue.

Why are you using * at the start of terms? FTS just ignores that, it's not
part of the documentation.

As to why it's not working, no idea. After you deleted the noise words did
you do a full rebuild?

Dan

> "Hilary Cotter" <hilary.cotter@gmail.com>, haber iletisinde sunlari yazdi:fced9e28-2f5a-4111-b32a-7db63180edf0@q77g2000hsh.googlegroups.com.
> ..
> you need to prepend a noise word on your query, ie:

> use pubs
> GO create table fttable (pk int not null identity constraint fttablepk
[quoted text clipped - 8 lines]
> T17.1.516.32 select * from fttable where contains(*,'1.516.32')--hit to
> T17.1.516.32

> On Feb 1, 3:02 am, "in da club" <s> wrote:
>> I have a table which has a record T17.1.516.32

>> I try
>> SELECT Urun_Ad as guUrun_Ad

>> FROM TBL_URUNLER

>> WHERE ( (CONTAINS(Urun_Ad, '"*t17.1.516.32*"' )

>> ))

>> it returns T17.1.516.32

>> i try

>> SELECT Urun_Ad as guUrun_Ad

>> FROM TBL_URUNLER

>> WHERE ( (CONTAINS(Urun_Ad, '"*1.516.32*"' )

>> ))

>> it returns

>> T17.1.516.32

>> and i try

>> SELECT Urun_Ad as guUrun_Ad

>> FROM TBL_URUNLER

>> WHERE ( (CONTAINS(Urun_Ad, '"*516.32*"' )

>> ))

>> it returns nothing. How can i solve the problem. i need like operator
>> task in fts.
Hilary Cotter - 06 Feb 2008 16:25 GMT
Add them back in.

Basically SQL FTS considers the * to be noise, so if what you are
looking for is also noise SQL FTS will be unable to tell them apart.

> in wrote  on Wed, 6 Feb 2008 09:48:07 +0200:
>
[quoted text clipped - 67 lines]
>
> - Show quoted text -
in da club - 06 Feb 2008 17:12 GMT
it is not a noise word issue.
I try  SND191P
it returns SND191P ( it is stored as SND191P in db)

However When i try 191P it returns nothing.
Daniel Crichton - 06 Feb 2008 17:20 GMT
in wrote  on Wed, 6 Feb 2008 19:12:10 +0200:

> it is not a noise word issue.
> I try  SND191P it returns SND191P ( it is stored as SND191P in db)

> However When i try 191P it returns nothing.

That's how it should work, FTS looks for whole words, or prefix's. It does
not allow searching for the end or middle of words.

When you say you cleared out the noise word file, did you remember to leave
a single space in it?

Signature

Dan

Hilary Cotter - 06 Feb 2008 19:24 GMT
My trick only works with a . or other word boundary descriminator
like ? or ! or ,  and some others.

You will need to do a like.

> in wrote  on Wed, 6 Feb 2008 19:12:10 +0200:
>
[quoted text clipped - 10 lines]
> --
> Dan
Hilary Cotter - 06 Feb 2008 19:22 GMT
my trick only works if there is a . or another character that sql fts
recognizes as a word boundary marker like . or ! or ?, and sometimes
-.

you will have to do a like.

> it is not a noise word issue.
> I try  SND191P
> it returns SND191P ( it is stored as SND191P in db)
>
> However When i try 191P it returns nothing.
in da club - 07 Feb 2008 10:39 GMT
What can i do to use prefix search . Do i leave FTS and use like operator ?
any idea?
Hilary Cotter - 07 Feb 2008 16:46 GMT
one thing you can do is to store your content in reverse from and then
reverse your search phase and do the wildcard that way, ie a search on
*phone would be searched as enohp*.

Other than that you need to do a like.

> What can i do to use prefix search . Do i leave FTS and use like operator ?
> any idea?
 
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.