[hibernate-dev] Question regarding Hibernate Search and multiple indexes for same Entity
Sanne Grinovero
sanne.grinovero at gmail.com
Sun Feb 24 06:26:13 EST 2008
Hello Aleksander,
I've been in a similar situation having to decide between Compass, direct Lucene
and Hibernate Search. I ended up using Hibernate Search because we use
Hibernate and I am very satisfied now, after a year of experience.
About your specific question, I'm not sure I understood your situation.
Do you have a single entity that is saved on multiple databases? How
do you tell when saving an entity to which database it belongs to?
Are you using Hibernate Shards?
Do you want all entities indexed in the same index, or do you need to
keep the indexes separated? You could also put a "type token" in the
index, so you can filter on one of them or choose to make a "global"
search on all databases.
Have you read about Hibernate Search index sharding capabilities?
You may get better answers in the user forums:
http://forum.hibernate.org/
regards,
Sanne Grinovero
2008/2/23, Aleksander M. Stensby <aleksander.stensby at integrasco.no>:
> Hello, my name is Aleksander M. Stensby.
> We are currently using Apache Lucene for our full-text indexing/search
> system, but are considering a possible move over to Hibernate Search (or
> possibly Compass).
> I've been looking at Hibernate Search and have a question that I hope to
> get some help with here (if this is the right list to ask the question,
> that is.)
>
> We currently have a pretty big and complex database system consisting of
> several "similar" databases. That is, the tables and the table structure
> of each of these X databses are the same, but the content is not, meaning
> it is not a mirroring og sharding system.
>
> What we do at the moment is run X different indexes, each representing a
> different database. The indexing is done by batch jobs running several
> times a day (we have a pretty large flow into our database every day). The
> solution is not very scalable, as we have experienced, and it causes big
> problems if something goes wrong with one of these batch jobs. Also, we
> actually run one of these processes for each database, each dealing with
> its own index. So yeah... a big mess in general.
>
> Since we do use Hibernate, I fell in love with the idéa of Hibernate's
> Event system taking care of this indexing for us, but one big and
> essential question remains:
>
> How can Hibernate "tackle" several different "identical" databases?
> I mean, the layout would be something like this:
>
> DB#1
> - TableA
> DB#2
> - TableA
> DB#X
> - TableA
>
> TableA in DB#1 would refer to entity no.integrasco.xxx.tableA, but so
> would TableA in DB#2, and TableA in DB#X...
> So how can we handle indexing of these entities into different indexes?
>
> So that DB#1 - TableA goes into:
> /usr/local/lucene/indexes/db1/tableA
> DB#2 into
> /usr/local/lucene/indexes/db2/tableA
> etc..
>
> Is it possible? Maybe I haven't spent enough time on this yet, if the
> answer is simple, please forgive me for wasting your time...
>
> Best Regards,
> Aleksander M. Stensby
>
> --
> Aleksander M. Stensby
> Senior Software Developer
> Integrasco A/S
> aleksander.stensby at integrasco.no
> Tlf.: +47 41 22 82 72
> _______________________________________________
> 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