-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Search: Indexing non-associated objects
PostPosted: Sat Aug 22, 2009 1:34 pm 
Newbie

Joined: Sat Aug 22, 2009 1:23 pm
Posts: 2
I want to index some tables of an existing database schema. these tables are not directly associated, but share the same id. for example, an entry in table A with id 123 and and an entry in table B with the same id belong together. this loose coupling is simply not avoidable, so we don't have to argue about the existing schema :)

the problem is that I want to index some columns of table A and some columns of table B, but for the same document. in other words, I want to query columns of table A and table B together and return a list of documentIds. I tried to put the index of both tables in the same directory and used the table's id as the DocumentId. but hibernate search creates different lucene documents for each table.

so my question is, how can I index non associated tables in one index where the columns of all tables belong to the same lucene documents?


Top
 Profile  
 
 Post subject: Re: Search: Indexing non-associated objects
PostPosted: Wed Aug 26, 2009 7:20 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Hi,

your description of the problem is too data(base) centric. In the end Hibernate is a Object Relational Mapper. What type of entities do you have? Can you provide some code?

I am also not sure what you actually expect as result. If you just want an array of ids you might want to read about Projections.

Regarding indexing, have you considered a custom bridge?

--Hardy


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.