views:

405

answers:

2

I posted a question yesterday about using Nhibernate search with nhibernate v2 and have recieved no responses. This has confirmed to me that I need to reconsider using NHibernate.Search and look at an alternative full text search solution. I want to be able to index and search documents and display the relevant extracts of the documents in the search results.

If I cant use Nhibernate.search there doesnt seem to be much point integrating Lucene into Nhibernate myself, are there any alternatives. I've had a look at Searcharoo, which I like because its code is so well documented that I would be comfortable integrating it into Nhibernate.

Are there any more libraries I should be looking at? Should i just use lucene without Nhibernate.Search?

+4  A: 

Lucene.Net is something I've used on various projects to do just that.

LINQ to Lucene is a project I work on that solves some of your problems. Lucene requires you have tight control of your indexing and searching. This is great when you want to build a high powered search engine for big systems. Bad, if you just want something that "just works" behind the scenes.

I've written a post on LINQ To Lucene for LINQ to SQL classes, but it works well for any POCO situation.

UPDATE: I'm not familiar with Nhibernate to Lucene system nor do I know how configurable it is. Coming from building real search subsystems with Lucene.Net, I've encountered several finicky things you have to deal with in building indexes and querying them.

  • search indexes fields are stored VERY different from databases. There is rarely a one to one mapping between db schema (or ORM entity) to index "schema".
  • If you want to access advanced search engine features like weighted queries, keyword highlighting, custom comparitors (sorters) (etc,etc) - you'll find an automated ORM<-->Lucene bridge will be inadequate. All these things require manual construction of Query object graphs instead of using the basic Lucene query syntax.

Essentially, if you want your search engine to be anything more than the most basic thing, then you'll want to use Lucene.Net directly.

CVertex
screamingpens.com is no more :-(
Mauricio Scheffer
Arck! My webserver is dead. I need to find a new home. Thanks for the heads up!
CVertex
A: 

I replied to your original answer. Hope it works. :)

Lck