簡體   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