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

Tip: Looking for answers? Try searching our database.

Full Text With Ranking Issue

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tanweer - 22 May 2008 01:25 GMT
I am using SQl server 2005 64 Bit Service Pack 2 with Full text on one table
and only on one field.
When I run query on my table of 800,000 rows Full text search find 4830
records within 18 seconds with skill Oracle in State CA.

SELECT * FROM srch.recent_people_search AS FT_TBL INNER JOIN
  CONTAINSTABLE(srch.recent_people_search, searchalltext, 'oracle') AS
KEY_TBL
  ON FT_TBL.recentpeoplesearchid = KEY_TBL.[KEY]
order by rank desc

To make it faster and make it more useful for my user I change the query to
show only frist 1000 records with  top ranking. When I do run the query below
It bring 342 records within 2 seconds eliminating other 700 rcords.

SELECT * FROM srch.recent_people_search AS FT_TBL INNER JOIN
  CONTAINSTABLE(srch.recent_people_search, searchalltext, 'administrative
and assistant',1000) AS KEY_TBL
  ON FT_TBL.recentpeoplesearchid = KEY_TBL.[KEY]
where statecode='ca'

The issue I am having is there are more than 1000 Oracle skill record in the
database in CA state but the way Fulltext use ranking it first select 1000
highest ranking record and then look for the next Where clause in this case
state of CA. Whcih basically defeat the purpose and come up with wrong data.

What can be done to take care of this isse.

Thanks in advance.

Thanks
Tanweer
Hilary Cotter - 23 May 2008 10:27 GMT
If you always query on state, seed your content with tags like StateCodeCA
and then search on:

SELECT * FROM srch.recent_people_search AS FT_TBL INNER JOIN
  CONTAINSTABLE(srch.recent_people_search, searchalltext, '"oracle" and
"StateCodeCA"') AS
KEY_TBL
  ON FT_TBL.recentpeoplesearchid = KEY_TBL.[KEY]
order by rank desc

Also make sure there is a non-clustered index on recentpeoplesearchid

>I am using SQl server 2005 64 Bit Service Pack 2 with Full text on one
>table
[quoted text clipped - 34 lines]
> Thanks
> Tanweer
Tanweer - 23 May 2008 19:35 GMT
This is a very good idea however it will require me to chane my fultext
population and will be hard for me for toher search condition like Zip code
search with distance calculation where I am looking for candidate in 10 miles
radius of a speific zip code.

Thanks
Tanweer

> I am using SQl server 2005 64 Bit Service Pack 2 with Full text on one table
> and only on one field.
[quoted text clipped - 28 lines]
> Thanks
> Tanweer
Hilary Cotter - 26 May 2008 22:10 GMT
What you would need to do is search on a variety of ZIPs, ie

SELECT * FROM srch.recent_people_search AS FT_TBL INNER JOIN
  CONTAINSTABLE(srch.recent_people_search, searchalltext, '"oracle" and (
"ZipCode94118" or "ZipCode94117" or "ZipCode94119"'  ) AS
KEY_TBL
  ON FT_TBL.recentpeoplesearchid = KEY_TBL.[KEY]
order by rank desc

Note the with a multiplicity of search conditions search performance does
decline somewhat.

> This is a very good idea however it will require me to chane my fultext
> population and will be hard for me for toher search condition like Zip
[quoted text clipped - 46 lines]
>> Thanks
>> Tanweer
Tanweer - 27 May 2008 16:54 GMT
Thanks, for Calrification I feel it will be a good apporach to resolve the
issue

Thanks
Tanweer

> What you would need to do is search on a variety of ZIPs, ie
>
[quoted text clipped - 58 lines]
> >> Thanks
> >> Tanweer
 
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.