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 / June 2007

Tip: Looking for answers? Try searching our database.

Near Clause usage

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brian - 13 Jun 2007 18:09 GMT
Two items:
Is there a way to limit the proximity of the two words in the NEAR clause to
less than 50 words in SQL Server 2005 when doing a Full Text search? I
believe the default is 50 words.

Also, I noticed when I do fulltext search over an xml type column I don't
get the exact words I m looking for within my NEAR clause:

Ex.
select  DocumentId, DocumentName, LegislationDocument
FROM Documents as Docs
WHERE CONTAINS(LegislationDocument, 'house NEAR hold')

This query returns housekeeper, household, holdings, etc.
Is there a way to have it search for just the exact word? I did try putting
double quotes around each word in the NEAR clause and that didn't seem to
help.

Any thoughts would be appreciated ... thanks.
Hilary Cotter - 14 Jun 2007 14:09 GMT
Unless you do some sort of charindex calculation there is no way to do
separation distance based proximity searches using SQL FTS.

By default the contains based search is exact. You should not get matches of
house to household. Which word breaker/language are you searching in?

Signature

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

> Two items:
> Is there a way to limit the proximity of the two words in the NEAR clause
[quoted text clipped - 17 lines]
>
> Any thoughts would be appreciated ... thanks.
Brian - 14 Jun 2007 15:08 GMT
I am using the English word breaker/language on an XML data type field.

From your first statement is the proximity of the words using the NEAR
clause within a CONTAINS still 50 words by default like it was in SQL Server
2000?

Thanks for the response Hilary.  

> Unless you do some sort of charindex calculation there is no way to do
> separation distance based proximity searches using SQL FTS.
[quoted text clipped - 23 lines]
> >
> > Any thoughts would be appreciated ... thanks.
Hilary Cotter - 14 Jun 2007 16:27 GMT
For contains yes. For Freetext the rank drops off to 0, but you might still
get nears results up to 1300 or so word separation.

Signature

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 am using the English word breaker/language on an XML data type field.
>
[quoted text clipped - 36 lines]
>> >
>> > Any thoughts would be appreciated ... thanks.
Brian - 14 Jun 2007 19:07 GMT
Thanks for the info, Hilary.

Do you any suggestions about the near clause not returning the exact words
being searched for?

> For contains yes. For Freetext the rank drops off to 0, but you might still
> get nears results up to 1300 or so word separation.
[quoted text clipped - 39 lines]
> >> >
> >> > Any thoughts would be appreciated ... thanks.
BWind - 18 Jun 2007 22:39 GMT
I was doing some selects using contains and the NEAR clause against an xml
data type within SQL Server 2005. I was noticing that the words were more
than 50 words apart (some of the hits far more than fifty words) . Noise
words are not counted as part of the fifty words, correct?  

> For contains yes. For Freetext the rank drops off to 0, but you might still
> get nears results up to 1300 or so word separation.
[quoted text clipped - 39 lines]
> >> >
> >> > Any thoughts would be appreciated ... thanks.
Hilary Cotter - 19 Jun 2007 12:55 GMT
Noise words are counted.

Signature

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 was doing some selects using contains and the NEAR clause against an xml
> data type within SQL Server 2005. I was noticing that the words were more
[quoted text clipped - 48 lines]
>> >> >
>> >> > Any thoughts would be appreciated ... thanks.
BWind - 19 Jun 2007 14:50 GMT
Thanks Hilary ....

Do have any thoughts on the words being farther than 50 words apart in my
NEAR clause using CONTAINS? Some of them are in the hundreds if I am counting
noise words. I thought I read that there are no configuration settings in SQL
Server 2005 for FTS to change this so I would be expecting a 50 word
separation. Could it be because I am FTS an XML document or am I possibly
doing something wrong?

Thanks again for all the responses!

> Noise words are counted.
>
[quoted text clipped - 50 lines]
> >> >> >
> >> >> > Any thoughts would be appreciated ... thanks.
 
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.