简体   繁体   English

Hibernate 搜索:org.hibernate.search.util.common.SearchException HSEARCH000610?

[英]Hibernate search: org.hibernate.search.util.common.SearchException HSEARCH000610?

I´m using hibernate search to create a metasearch engine, when I compile the project it does not give me any error but when I execute the request it gives me the following error:我使用 hibernate 搜索来创建一个元搜索引擎,当我编译项目时它没有给我任何错误但是当我执行请求时它给了我以下错误:

org.hibernate.search.util.common.SearchException: HSEARCH000610: Unknown field 'CODIGO'.
Context: indexes [Vehiculo]
        at org.hibernate.search.engine.backend.scope.spi.AbstractSearchIndexScope.fieldInternal(AbstractSearchIndexScope.java:150)
        at org.hibernate.search.engine.backend.scope.spi.AbstractSearchIndexScope.field(AbstractSearchIndexScope.java:138)
        at org.hibernate.search.engine.backend.scope.spi.AbstractSearchIndexScope.fieldQueryElement(AbstractSearchIndexScope.java:205)
        at org.hibernate.search.engine.search.predicate.dsl.impl.MatchPredicateFieldMoreStepImpl.<init>(MatchPredicateFieldMoreStepImpl.java:45)
        at org.hibernate.search.engine.search.predicate.dsl.impl.MatchPredicateFieldStepImpl.fields(MatchPredicateFieldStepImpl.java:26)

You're tring to search on the index field CODIGO and Hibernate Search is telling it doesn't know about that field.您尝试在索引字段CODIGO上搜索,而 Hibernate 搜索告诉它不知道该字段。

Your schema needs to be declared, and that happens through annotations on entity properties or an equivalent programmatic mapping .您的模式需要声明,这通过实体属性上的注释或等效的编程映射来实现。

There is some support for dynamic fields , but that involves the more complex bridge APIs , and if you want everything to be dynamic ("schemaless"), Hibernate Search will probably fall short.一些对动态字段的支持,但这涉及更复杂的桥 API ,如果您希望所有内容都是动态的(“无模式”),Hibernate 搜索可能会达不到要求。

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

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