Is it possible to combine SOLR and NHibernate Search

502 views Asked by At

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

2

There are 2 answers

0
Mauricio Scheffer On BEST ANSWER

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...

0
Jay On

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