views:

141

answers:

2

I am using SQL Server 2008 Full Text capabilities for the first time. I like the features that CONTAINS and CONTAINSTABLE offer, but I don't expect my users to learn the syntax for looking for inflections, using phrases, proximity, etc.

My GUI will have a single text box to search with. Is there anything (.net DLL or c# code) out there to convert the very common search engine operators to the CONTAINS syntax of SQL Server 2008? I don't have to use every feature of CONTAINS, just things like boolean operators, phrases, wildcards, exclusions, and possible inflections.

+1  A: 

I found this:

A Google-like Full Text Search

It utilizes Irony.

Has anyone ever used this?

EDIT

I have found that an up to date version of this is included with the Irony source download on the codeplex page. I will do some testing with it and post my findings.

MY FINDINGS

It just isn't reliable enough. The updated version of the SearchGrammer class doesn't work half as well as the old version that Michael Coles created. However, the old version isn't hard to crash. It is starting to seem that actually using sql server 2008 FTS in a client application is not going to be easy at all.

Ronnie Overby
A: 

Have you considered simply using Lucene.net?

This involves additional effort at the sql server level, and does not support some of the complex queries than are possible with FTS but it will be providing just the sort of search your users are expecting.

This is recommended by quite a few people within stack overflow:

Ultimately you can try to push a non 'user centric' model into a user style mode or expend effort instead on adding an existing user centric search functionality.

I would suggest that if the following are true:

  • You have the hardware for the additional indexing requirements
  • You can handle the additional lag in the validity of the lucene.net index verses the FTS one.

Then you will have more success simply adding lucene.net

ShuggyCoUk