最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Find docs with no field or field set to false in SOLR - Stack Overflow

programmeradmin6浏览0评论

Given

<field name="active" type="boolean" indexed="true" stored="true" multiValued="false" docValues="true"/>

I'd like to find docs where field with name active is missing or has active set to false.

fq=((-active:*) OR (active:false)) returns only (active:false) docs, but does not include the ones with missing active field (-active:*).

What is the correct way todo this kind of fq query?

发布评论

评论列表(0)

  1. 暂无评论