牛牛在线工具

SolrQuery::removeFacetDateOther()

收录 8868 个 PHP 函数,含用途说明与用法示例。

SolrQuery::removeFacetDateOther()

从SolrQuery对象中移除facet.date.other参数,该参数用于控制是否在日期facet结果中包含其他值(即不在指定日期范围内的值)

函数名称:SolrQuery::removeFacetDateOther() 适用版本:Solr PECL扩展版本 2.0.0以上 函数描述:该函数用于从SolrQuery对象中移除facet.date.other参数,该参数用于控制是否在日期facet结果中包含其他值(即不在指定日期范围内的值)。 用法示例: // 创建SolrQuery对象 $query = new SolrQuery(); // 设置facet.date.other参数为true $query->setFacetDateOther(true); // 打印设置前的facet.date.other参数值 echo "设置前的facet.date.other参数值:"; var_dump($query->getFacetDateOther()); // 移除facet.date.other参数 $query->removeFacetDateOther(); // 打印移除后的facet.date.other参数值 echo "移除后的facet.date.other参数值:"; var_dump($query->getFacetDateOther()); 输出: 设置前的facet.date.other参数值:bool(true) 移除后的facet.date.other参数值:NULL 注意事项: 在调用removeFacetDateOther()函数之前,必须先使用setFacetDateOther()函数设置facet.date.other参数为true或false。 调用removeFacetDateOther()函数后,getFacetDateOther()函数将返回NULL,表示facet.date.other参数已被移除。 该函数仅适用于使用Solr PECL扩展的PHP版本,并且Solr PECL扩展版本必须为2.0.0以上。