简体   繁体   English

xml配置用于在休眠中进行索引搜索

[英]xml configure for index search in hibernate

Please give me an example to index database use hibernate 3, lucense search and xml confiure.请给我一个例子来索引数据库使用 hibernate 3,lucense 搜索和 xml 配置。

Currently i can't find equivalent xml configure tags for annotation: @DocumentId.目前我找不到用于注释的等效 xml 配置标签:@DocumentId。

Thanks.谢谢。

There is no option to use xml as a replacement for Lucene annotations in Hibernate Search, as there is with some of the other Hibernate search annotations.没有选项可以使用 xml 替代 Hibernate Search 中的 Lucene 注释,就像其他一些 Hibernate 搜索注释一样。

You'll either have to use annotations, or create the functionality for mapping xml to annotations yourself.您要么必须使用注释,要么自己创建将 xml 映射到注释的功能。

It doesn't look like it would be too horrible to modify or extend org.hibernate.reflection.java.EJB3OverridenAnnotationReader , if it's really necessary.如果真的有必要,修改或扩展org.hibernate.reflection.java.EJB3OverridenAnnotationReader看起来并不太可怕。

Found a few notes with some guidelines on the right way to go about this: https://community.jboss.org/wiki/HowToImplementXMLMappingForHibernateSearch找到了一些关于正确方法的指南: https : //community.jboss.org/wiki/HowToImplementXMLMappingForHibernateSearch

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

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