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 2005

Tip: Looking for answers? Try searching our database.

Fulltext query not seeming to use "and"

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tshad - 15 Mar 2005 23:37 GMT
I have the following:

     SELECT jobTitle from position where FreeText(jobDescription,'sales and
ccna') order by JobTitle DESC

This gives me 11 hits

If change change the FreeText clause to:

     FreeText(jobDescription,'sales')

I get the same 11 hits.

But if I change it to:

     FreeText(jobDescription,'ccna')

I get no hits.

I would have thought 'sales and ccna' would also have given me 0 hits.

What am I missing?

Thanks,

Tom
Hilary Cotter - 15 Mar 2005 23:54 GMT
You should use a boolean AND for this with Contains to get what you are
looking for.

select * from Contains(*,'"sales" and "ccna"')

FreeText will ignore the and unless it is removed from the noise word list,
in which case it will search on it. FreeText is a fuzzy search and not
exact. So it will rank rows which contain sales and ccna higher than rows
which contain only ccan or only sales.
.
>I have the following:
>
[quoted text clipped - 22 lines]
>
> Tom
tshad - 16 Mar 2005 00:25 GMT
> You should use a boolean AND for this with Contains to get what you are
> looking for.
[quoted text clipped - 5 lines]
> not exact. So it will rank rows which contain sales and ccna higher than
> rows which contain only ccan or only sales.

That was what I was looking for.

BTW you said that FreeText would rank the rows.  Can you do that with
Contains?  I would like to do this in some cases.

Thanks,

Tom
> .
>>I have the following:
[quoted text clipped - 23 lines]
>>
>> Tom
Hilary Cotter - 16 Mar 2005 00:27 GMT
actually I made a mistake, both FreeTextTable and ContainsTable will return
a rank value.

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

> > You should use a boolean AND for this with Contains to get what you are
> > looking for.
[quoted text clipped - 41 lines]
> >>
> >> Tom
 
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.