略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: Solr

2024-04-26

Apache Solr

add a noteadd a note

User Contributed Notes 3 notes

up
5
ASchmidt at Anamera dot net
3 years ago
This extension was last updated for PHP 7.1 three years ago.

As of this date, it has not been released for PHP 7.2 or PHP 7.3. In other words, it's not actively maintained.
up
3
Corentin Larose
9 years ago
Hello,

you have to use SolrQuery::addFilterQuery() instead of SolrQuery::addFacetQuery() which is intended for another goal.

SolrQuery::addFilterQuery() : fq
SolrQuery::addFacetQuery() : facet.query

Regards,

Corentin Larose - CTO@QAPA
up
-7
mixwise at gmail dot com
10 years ago
solr_get_version(): 1.0.1
solr:3.3.0

I had problems trying to pass facet queries(fq not facet.query) using this extension.

So I made a work around by extending the SolrQuery class and adding a new method for fq.
<?php
class SolrQuery2 extends SolrQuery{
    public function
addFQ($facetQuery){
       
$this->addParam('fq', $facetQuery);
    }
}
?>

官方地址:https://www.php.net/manual/en/book.solr.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3