I've implemented a fulltext search for one of our products. I'm using the CONTAINS/CONTAINSTABLE
keyword for searching. But the problem is, that i often get syntax errors, because of wrong search conditions/input.
Is there a simple way to make the fulltext search enduser freandly, or do i have to build my own preparser before executing the search. For example splitting the search with a shunting yard and build a complete new search string?
It would be nice, if there is a more simple way, like SAP Sybase SQL Anywhere provides (They have a nice, robust fulltext search/index).
Thank you!
I've previously used Michael Coles article "A Google-like Full Text Search" to help me create a user friendly ASP.Net front-end to SQL Server FTS. The article goes into a good level of detail about how he uses Roman Ivantsov's Irony .NET Compiler Construction Kit to 'compile' a modified Google search syntax into a SQL Server FTS CONTAINS query. You don't have to understand it all though - there's a sample download that will get you going as long as you've got basic C# .Net skills.
I was very pleased with the result and the users were very pleased that they could do full text searches using a syntax they were already familiar with.
Hope this helps,
Rhys