views:

43

answers:

2

I am new to SOLR but am aware that it is built on top of lucene. I was wondering if it is possible to use existing NHibernate Search, which obviously works directly with Lucene, to add/update items in SOLR? If so, is this considered a bad practice?

Thank in advance,

JP

+1  A: 

This presentation by Scott Cowan covers it: http://sleepoverrated.com/archive/2010/05/workshop-on-lucene-netnhibernate-searchsolr/

…and you can get information about SOLRNET's built-in NHibernate integration here: http://code.google.com/p/solrnet/wiki/NHibernateIntegration

Jay
Thanks, but Scott really didn't go into much detail on this specific area...
JP
+1  A: 

NHibernate.Search deals with Lucene.NET, which works at a very different level than Solr. It just doesn't make sense to use the same code with Solr, which BTW is a different process.

The closest thing is the SolrNet-NHibernate integration. Or you can write your own NHibernate event listeners to map your NHibernate entities to Solr. Or use something entirely different, like the DataImportHandler. There are many options...

Mauricio Scheffer