views:

849

answers:

2

I have an MS SQL database and have a varchar field that I would like to do queries like where name like '%searchTerm%'. But right now it is too slow, even with sql enterprise's full text indexing.

Can someone explain how Lucene .Net might help my situation? How does the indexer work? How do queries work?

What is done for me, and what do I have to do?

+3  A: 

This article (strangely enough it's on the top of the Google search results :) has a fairly good description of how the Lucene search could be optimised.

Properly configured Lucene should easily beat SQL (pre 2005) full-text indexing search. If you on MS SQL 2005 and your search performance is still too slow you might consider checking your DB setup.

Ilya Kochetov
Voted down because link is dead.
Josh Kodroff
The link is dead. I provided what may be an alternate link: http://it-stream.blogspot.com/2007/12/full-text-search-for-database-using.html
torial
+4  A: 

I saw this guy (Michael Neel) present on Lucene at a user group meeting - effectively, you build index files (using Lucene) and they have pointers to whatever you want (database rows, whatever)

http://code.google.com/p/vinull/source/browse/#svn/Examples/LuceneSearch

Very fast, flexible and powerful.

What's good with Lucene is the ability to index a variety of things (files, images, database rows) together in your own index using Lucene and then translating that back to your business domain, whereas with SQL Server, it all has to be in SQL to be indexed.

It doesn't look like his slides are up there in Google code.

Cade Roux
Slides and code: http://code.google.com/p/vinull/source/browse/#svn/Presentations/Lucene
Bill Paetzke