Solr Facet 搜索时,facet.missing = true 的真正含义 . 博客分类: solr solrfacet
程序员文章站
2024-03-18 20:41:58
...
Solr的WiKI原文是如下解释:
facet.missing
Set to "true" this param indicates that in addition to the Term based constraints of a facet field, a count of all matching results which have no value for the field should be computed
The default value is false.
This parameter can be specified on a per field basis.
个人实验下来,当missing=true时,只有当facet.field在匹配的document中根本不存在(就是在生成索引时,根本就没有加入这个field),才会被统计。(即使field为null或者为“”,都不会被统计)。
facet.missing
Set to "true" this param indicates that in addition to the Term based constraints of a facet field, a count of all matching results which have no value for the field should be computed
The default value is false.
This parameter can be specified on a per field basis.
个人实验下来,当missing=true时,只有当facet.field在匹配的document中根本不存在(就是在生成索引时,根本就没有加入这个field),才会被统计。(即使field为null或者为“”,都不会被统计)。