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 / December 2005

Tip: Looking for answers? Try searching our database.

Getting context of search results

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mr. Roundhill - 14 Oct 2005 21:52 GMT
Anyone know how to get the context of the search results in a full text
query?  I'm trying to get similar results to the popular seach engines where
it displays the link to the document, and underneath it it shows the context
of the search words in the context of the document.  For example, searching
for SQL server on google:

SQL Server Home
Visit this portal for all the latest news and articles to help you evaluate
Microsoft SQL Server 2000 for your data management and analysis needs.

Thanks!

-- are we all computer monkeys?
Hilary Cotter - 15 Oct 2005 00:25 GMT
this is called hit highlighing.

Here is one way to do it - the least efficient way.

http://groups.google.com/group/microsoft.public.sqlserver.fulltext/msg/81eb71cac
37c6cf3?dmode=source


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

> Anyone know how to get the context of the search results in a full text
> query?  I'm trying to get similar results to the popular seach engines
[quoted text clipped - 13 lines]
>
> -- are we all computer monkeys?
John Kane - 15 Oct 2005 17:53 GMT
Mr. Roundhill,
Try the following SQL FTS query on the pubs table pub_info as the following
query will return rows that match the FTS search word (books) and the near
by words from 20 characters before the searched keyword (books) for a total
length of 100 characters.

SELECT pub_id,  SubString(pr_info,PatIndex ('%books%',pr_info)-20,100)
FROM pub_info
 WHERE Contains(pr_info, 'books')

Regards,
John
Signature

SQL Full Text Search Blog
http://spaces.msn.com/members/jtkane/

> Anyone know how to get the context of the search results in a full text
> query?  I'm trying to get similar results to the popular seach engines
[quoted text clipped - 13 lines]
>
> -- are we all computer monkeys?
Mr. Roundhill - 14 Dec 2005 18:21 GMT
Thanks for the help!  That seems to work just fine.

> Mr. Roundhill,
> Try the following SQL FTS query on the pubs table pub_info as the following
[quoted text clipped - 25 lines]
> >
> > -- are we all computer monkeys?
 
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.