简体   繁体   English

两个应用程序在Hibernate Search中使用相同的索引文件

[英]Two Applications using the same index file with Hibernate Search

I want to know if it is possible to use the same index file for an entity in two applications. 我想知道是否可以在两个应用程序中为实体使用相同的索引文件。 Let me be more specific: 让我更具体一点:

We have an online Application with a frondend for the users and an application for the backend tasks (= administrator interface). 我们有一个在线应用程序,其中有一个用于用户的叶状花序和一个用于后端任务的应用程序(=管理员界面)。 Both are running on the same JBOSS AS. 两者都在同一JBOSS AS上运行。 Both Applications are using the same database, so they are using the same entities. 两个应用程序使用相同的数据库,因此它们使用相同的实体。 Of course the package names are not the same in both applications for the entities. 当然,实体的两个应用程序中的程序包名称都不相同。

So this is our usecase: A user should be able to search via the frondend. 这就是我们的用例:用户应该可以通过frondend搜索。 The user is only allowed to see results which are tagged with "visible". 仅允许用户查看标记为“可见”的结果。 This tagging happens in our admin interface, so the index for the frontend should be updated every time an entity is tagged as "visible" in the backend. 此标记发生在我们的管理界面中,因此,每次在后端将实体标记为“可见”时,都应更新前端的索引。

Of course both applications do have the same index root folder. 当然,两个应用程序确实具有相同的索引根文件夹。 In my index folder there are 2 index files: 在我的索引文件夹中,有2个索引文件:

de.xxadmin.model.Product de.xxfrondend.model.Product de.xxadmin.model.Product de.xxfrondend.model.Product

How to "merge" this via Hibernate Search Configuration? 如何通过Hibernate Search Configuration进行“合并”? I just did not get it via the documentation... 我只是没有通过文档得到它...

Thanks for any help! 谢谢你的帮助!

好吧,看来这是不可能的...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM