[hibernate-dev] brainstorming hibernate search integration Solr

Sanne Grinovero sanne at hibernate.org
Fri May 25 06:24:10 EDT 2012

Hi Gustavo,
as I already had replied on the forums, if all you need is to have
Solr read the Hibernate Search index that should already work without
any needed change.

Main points to check:
 - use a Solr version which uses a Lucene version which matches
Hibernate Search. Not a strict requirement, but so doing you wouldn't
have to verify more subtle things.
 - Make sure that in your architecture only one of the two ever writes
to the index. I guess you want Hibernate Search writing, then make
sure Solr doesn't write to it.
   -- Solr had internal caches - make sure they are either disabled or
otherwise *notice* the changes made by Hibernate Search
 - Make a Solr schema compatible with your mapped entities

There is one change that could be done in Hibernate Search to make
your work even easier: you could have the DocumentBuilder component of
Hibernate Search to provide some "export metadata" functionality;
so you could write a metadata exported which could create the Solr
schema files automatically from the entity mapping. That would be a
nice contirbution, as others have asked as well to be able to "dump"
or otherwise inspect the "schema" used by Hibernate Search.


On 25 May 2012 08:08, Gustavo Candela <gustavo.candelar at gmail.com> wrote:
> Hi all,
> Lately i have been thinking about integrating Hibernate Search with Solr.
> What i would like to have is Solr using Hibernate Search indexes. I could
> not start the implementation because i am working in other things at this
> moment. I would like to know any references or ideas....
> I don't know if HS puts some metainformation in the indexes and solr can
> not read them....i also think that i have to create an schema in solr with
> the index fields...
> I am working on a very important project using hibernate search as
> persistence. My boss asked about this question last week and i decided to
> google it a little bit. You can find the post that i wrote here:
> https://forum.hibernate.org/viewtopic.php?f=9&t=1015540
> Thanks everybody,
> Hibernator,
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev

More information about the hibernate-dev mailing list