简体   繁体   English

如何将木兰cms与休眠搜索集成在一起?

[英]how to integrate magnolia cms with hibernate search?

Did somebody manage to get a working application which included these 2 frameworks? 是否有人设法获得了包含这两个框架的有效应用程序?

The problem I'm facing is that the dependencies are like this: 我面临的问题是依赖项是这样的:

magnolia 4.4.5 -> apache jackrabbit 1.6.4 -> apache lucene 2.4.1 hibernate search 3.4.1.Final -> apache lucene 3.1.0 玉兰4.4.5-> apache jackrabbit 1.6.4-> apache lucene 2.4.1休眠搜索3.4.1.Final-> apache lucene 3.1.0

So there's an inconsistency for the lucene version. 因此,lucene版本存在不一致之处。 And I need a version of hibernate search that's with annotations. 而且我需要一个带有注释的休眠搜索版本。

I've really tried to integrate these 2 but with no luck. 我确实尝试过将这2种方法整合在一起,但是没有运气。 I hope somebody else managed to. 我希望其他人能够做到。

Thanks :) 谢谢 :)

We have succesfully used this a long time. 我们已经成功使用了很长时间。 It really sucks that Jackrabbit is so slow to update Lucene. Jackrabbit更新Lucene的速度如此之慢,真让人感到遗憾。 That makes it hard. 这很难。 I think you should consider using Solr in a separate JVM just to get rid of this dependency. 我认为您应该考虑在单独的JVM中使用Solr只是为了摆脱这种依赖性。

Having said that, this is how you can solve it. 话虽如此,这就是您可以解决的方法。 What defines what is possible is Jackrabbit. 定义可能的是Jackrabbit。

Jackrabbit 1.6.x and you MUST use Lucene 2.4.x. Jackrabbit 1.6.x,您必须使用Lucene2.4.x。 We did that successfully a long time but was then forced to use an old hibernate search. 我们成功完成了很长一段时间,但是后来被迫使用旧的休眠搜索。 If you want to I can give you that config as well. 如果您愿意,我也可以为您提供该配置。

But recently when jackrabbit released 2.3.0 it depends on Lucene 3.0.3. 但是最近,当jackrabbit发布2.3.0时,它依赖于Lucene 3.0.3。 It breaks on 3.1.0, so you must use Lucene 3.0.3. 它在3.1.0上中断,因此您必须使用Lucene 3.0.3。

This is our config simplified: 这是我们简化的配置:

org.apache.jackrabbit:jackrabbit-core 2.3.0 org.apache.jackrabbit:jackrabbit-core 2.3.0
- exclude org.apache.lucene:lucene-core -排除org.apache.lucene:lucene-core

org.hibernate:hibernate-core:3.6.7.Final org.hibernate作为:休眠核心:3.6.7.Final

org.hibernate:hibernate-commons-annotations:3.2.0.Final org.hibernate作为:冬眠公地的注解:3.2.0.Final
- exclude org.hibernate:hibernate -排除org.hibernate:hibernate

org.hibernate:hibernate-search:3.3.0.Final or 3.4.0.CR1 org.hibernate:hibernate-search:3.3.0.Final或3.4.0.CR1
- exclude org.hibernate:ejb3-persistence -排除org.hibernate:ejb3-persistence
- exclude org.apache.lucene:lucene-core -排除org.apache.lucene:lucene-core

(3.4.0.CR1 is the last hibernate search that depends on Lucene 3.0.3, but if you don't want beta-versions use 3.3.0 or 3.3.1) (3.4.0.CR1是最后一个依赖Lucene 3.0.3的休眠搜索,但是如果您不希望Beta版本使用3.3.0或3.3.1,则为休眠搜索)

org.apache.lucene:lucene-core:3.0.3 org.apache.lucene:Lucene的核心:3.0.3

Magnolia 4.4.5 木兰4.4.5

The normal Hibernate Annotations project is now included in org.hibernate:hibernate-core:3.6.7.Final so no need to depend on that. 普通的Hibernate Annotations项目现在包含在org.hibernate:hibernate-core:3.6.7.Final中,因此不必依赖于此。

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

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