繁体   English   中英

休眠搜索-将字段与索引中的另一个字段进行比较

[英]Hibernate Search - Compare field to another field in the index

我正在寻找一种比较两个索引是否匹配的方法。

我想做这样的事情:

org.apache.lucene.search.Query luceneQuery = qb.keyword().onFields("favourites.dataItem.dataId").matching(<another field>).createQuery();

似乎在官方文档中找不到它。 如果有人能指出我正确的方向,我将不胜感激。

您不能在Hibernate Search或Lucene中做到这一点。 如果我理解正确,那么您想知道给定实体(由Lucene索引中的Lucene文档支持)是否在两个字段中具有相同的值。 实际上,这更适合SQL或Hibernate Criteria查询。

暂无
暂无

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

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