简体   繁体   English

将二进制文件与Lucene文档相关联

[英]Associating binary to a Lucene Document

I have a number of POJO's, each with a String field that I am indexing and searching using Lucene. 我有许多POJO,每个POJO都有一个String字段,我正在使用Lucene对其进行索引和搜索。 However, I seem to be missing an easy way to associate a "found" keyphrase with the (unique) object that it comes from. 但是,我似乎缺少将“找到的”关键字短语与它来自的(唯一)对象相关联的简便方法。 Does anyone know how to do this? 有谁知道如何做到这一点?

Don't your POJO's have some kind of business key or ID? 您的POJO是否没有某种业务密钥或ID? Index that along with the String field. 将其与String字段一起编制索引。

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

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