Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
if (post.getRefUserId() != null) { Field refUserId = new LongField("ref_user_id", post.getRefUserId(), Store.YES); fields.add(refUserId); }
如果字段 ref_user_id 存在,我会对其进行索引。
我想查询没有索引 ref_user_id 字段的文档,怎么做?
好的,似乎给该字段一个默认值(0或其他)是我能想出的唯一解决方案。
更好的解决方案
*:*和-ref_user_id:[* TO *]
*:*
-ref_user_id:[* TO *]