I think I have not explained well ...
When the administrator creates a new repository, the CMS creates a new index "on the fly" not when the system starts. Regardless of another indexes of the same class exists, for each new repository a new index is created. Also, when the user searches for in a repository, the CMS searchs in the index associated, not in all indexes.
I've not seen would be possible do that with Hibernate Search because, as you said, the indexes are created in start time and the same class is associated with only one index.
For example, there are three photograph repositories, A, B and C. The document class (PhotographBean.java) is the same for them. The system creates three differents indexes, each one with its documents.
This architecture gives us several adventages, one of this is when the index is corrupted and its must be reindexed. The system only reconstruct this one, not a big index with about 2 million of documents.
The user can works with the other repositories, meanwhile the corrupted is reindexed.
Is there any manner to replicate this architecture with Hibernate Search?
|