views:

232

answers:

2

My site has a database of widgets, each widget has a name and description. I want to implement a fast and relevant search system on my site, how do I do this?

As a side note, I also implemented tags on those widget. Here is how I implemented (Tell me what you think):

Table widgets: has unique id plus other info for a widget Table tag_words: Has unique ID and of course, the tag Table tag-widget: Join table that associates a tag to a widget

I've created indexes on both all those columns to make search as fast as possible.

+3  A: 

If you're using SQL Server, you can utilize full-text search. As for the tags, that's the best way for a small to medium site. StackOverflow denormalizes the tagging for faster reads, but for your app I would probably avoid that.

John Rasch
+3  A: 

Lucene.NET is an alternative if you can't use the built-in full-text search from your database. It also gives you better control over what and how things are indexed.

Reading your side note about tags, I think I would really use Lucene.NET. It will give allow you to decide how to rank the tags in relation to everything else whereas I don't know if that is possible with SQL Server's full text search.

consultutah