Question

I have a .net server based application, that needs to be able to do a full text 'fuzzy' search of a single db column only. The underlying db engine is SQL Server 2008 r2.

The data column is write once (never modified), and it is expected that under 'load' there will be up to 10 new strings being added per minute.

The strings are capped at 1000 characters. Currently only in Western languages, but it is planned to add others in the future.

The consuming client will pass a search term (most likely space separated keywords) to the server, which will then return a list of matching records back to the client.

The only 'complicated' part of this is that misspellings and similar words need to be catered for.

It feels as if rolling my own using something like DoubleMetaphone would work, but will obviously require development effort.

So I'm wondering if people think some of the existing search 'apps' out there may be suitable? (Lucene.net for example). Or if they will be overkill for such a small search requirement.

Was it helpful?

Solution

I would use SQL Server Full-Text Search. It's powerful, adjustable, supports linguistic features of different languages and so on.

I think you should start from this: http://msdn.microsoft.com/en-us/library/ms142571(v=sql.105).aspx

Very general steps to apply it to your application will be:

  1. Install Full-Text Search component from SQL Server installation.

  2. Create and adjust Full-Text index in your database.

  3. Define a search query with the necessary predicates.

  4. Integrate to your application!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top