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