Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12345»»»

A Google-like Full Text Search Expand / Collapse
Author
Message
Posted Monday, October 6, 2008 11:53 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, September 24, 2014 1:20 PM
Points: 1,276, Visits: 1,135
Comments posted to this topic are about the item A Google-like Full Text Search
Post #581526
Posted Tuesday, October 7, 2008 2:15 AM
SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Thursday, October 16, 2014 4:46 AM
Points: 5,406, Visits: 1,400
This is a gr8 stuff.....


Post #581582
Posted Tuesday, October 7, 2008 2:16 AM


Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, October 20, 2014 8:27 AM
Points: 21, Visits: 206
Hi Mike,
very useful article, especially code - thank you.

I tested code and found one problem.

If I entered phrase:

president -aluminium

it wokrs fine.

If phrase is:
-aluminium president

it generates syntax error, phrase cannot start from negation. I checked goole it understand correctly this kind of phrases.

How can I edit grammar to avoid this kind of errors?

Thank you again.
Regards,
Oleg.



Post #581583
Posted Tuesday, October 7, 2008 2:31 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, March 27, 2009 4:01 AM
Points: 14, Visits: 40
More time talking about a c# compiler than the SQL. No talk of the limitations of the FTS.

Bit of a waste of time really.

From title of piece I was hoping for something about combining site useage stats stored in SQL with the FTS results to actually make something Google like. Google is not defined by its syntax, which few users use, but by the relevancy of its results.
Post #581591
Posted Tuesday, October 7, 2008 5:59 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, October 21, 2010 9:50 AM
Points: 24, Visits: 41
Good article.
Actually, with Nautilus you can find a table just writing part of its name and once located you can find a record writing any word which is compared with like if it's a string and with "=" if its an integer.
The query is built for all the fields:

select top 10 *
from dbo.Customers (nolock)
where CustomerID like '%ana%' or CompanyName like '%ana%' or ContactName like '%ana%'...


Once the record is located, you can see it's related records (following the FK links).

There is also a "google like" search where you write a word or number and looks for it in the whole database.
Not much like google, but it works for developers.

Thanks, Marcos (http://sourceforge.net/projects/nautilus/)
Post #581708
Posted Tuesday, October 7, 2008 7:32 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Wednesday, October 22, 2014 12:34 PM
Points: 31,181, Visits: 15,626
Bit of a waste of time really.


That's fairly rude of you. The description of the article seems to fit and there are plenty of people that would like to use Google syntax to build search on FTS.

Good job, Michael, in showing how FTS can be used in conjunction with other tools to help add search to your applications.







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #581775
Posted Tuesday, October 7, 2008 7:50 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, June 7, 2011 3:27 PM
Points: 1, Visits: 22
I 2nd that. I think there will be a demand for this sort of thing. I'm in a hurry nowadays, grappling for a wire to hold on to, so I wasn't able to download the source and test it. But you can bet that I am going to bookmark it. db:)
Post #581800
Posted Tuesday, October 7, 2008 8:35 AM


Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Monday, December 9, 2013 1:26 PM
Points: 60, Visits: 258
While I am still trying to digest this excellent article, I think I found a slight error.

In The Grammar section, the article lists 7 rules. One of them is...
	PrimaryExpression ::= Term
| '-' Term
| Phrase
| '(' OrExpression ')'
| '<' ( Term | Phrase )+ '>'

To more closely match the code in the Conversion Engine section, I think it should be more like the following.
Note the addition of the ExactExpression option.
	PrimaryExpression ::= Term
| '-' Term
| ExactExpression
| '(' OrExpression ')'
| Phrase
| '<' ( Term | Phrase )+ '>'

A minor point, I know. I just want to make sure that I am not missing something here. :D


Paul DB
Post #581873
Posted Tuesday, October 7, 2008 8:47 AM


Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, October 20, 2014 8:27 AM
Points: 21, Visits: 206
Steve Jones - Editor (10/7/2008)
Bit of a waste of time really.


That's fairly rude of you. The description of the article seems to fit and there are plenty of people that would like to use Google syntax to build search on FTS.

Good job, Michael, in showing how FTS can be used in conjunction with other tools to help add search to your applications.


Yes Steve, you are right.
I work with FTS some years, and for me it is important because some customers would like to have this kind of syntx. Thanks.
Post #581885
Posted Tuesday, October 7, 2008 9:47 AM


Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, October 20, 2014 8:27 AM
Points: 21, Visits: 206
marcosc (10/7/2008)
Good article.
Actually, with Nautilus you can find a table just writing part of its name and once located you can find a record writing any word which is compared with like if it's a string and with "=" if its an integer.
The query is built for all the fields:

select top 10 *
from dbo.Customers (nolock)
where CustomerID like '%ana%' or CompanyName like '%ana%' or ContactName like '%ana%'...


Once the record is located, you can see it's related records (following the FK links).

There is also a "google like" search where you write a word or number and looks for it in the whole database.
Not much like google, but it works for developers.

Thanks, Marcos (http://sourceforge.net/projects/nautilus/)


Sorry, but Full-Text search is another feature than LIKE operator.
Post #581942
« Prev Topic | Next Topic »

Add to briefcase 12345»»»

Permissions Expand / Collapse