note 128384 added to solrparams.addparam
| From: | horaciod at gmail dot com | Date: | Tue, 11 Apr 2023 23:02:54 +0000 |
| Subject: | note 128384 added to solrparams.addparam | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-220340@lists.php.net to get a copy of this message | ||
great for adding unintended parameters in other functions like facet.contains
?php
$facet = 'title' ;
$str='isto';
$query = new SolrQuery($filter);
$query->setFacet(true)->setShowDebugInfo(true);
$query->addFacetField($facet)->setFacetMinCount(1)->setFacetLimit(200)->setfacetsort(SolrQuery::TERMS_SORT_INDEX);
$query->addparam('facet.contains',$str) ;
?>
// result of $query->getparams() //check the lastone
array(8) {
["q"]=> array(1) {
[0]=> string(20) "collection_id_str:61"
}
["facet"]=> array(1) {
[0]=> string(4) "true"
}
["debugQuery"]=> array(1) {
[0]=> string(4) "true"
}
["facet.field"]=> array(1) {
[0]=> string(11) "440a_str_mv"
}
["facet.mincount"]=> array(1) {
[0]=> string(1) "1"
}
["facet.limit"]=> array(1) {
[0]=> string(3) "200"
}
["facet.sort"]=> array(1) {
[0]=> string(5) "index"
}
["facet.contains"]=> array(1) {
[0]=> string(4) "isto"
}
}
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.13.130 (proxied: 200.12.138.8)
----
Manual Page -- https://php.net/manual/en/solrparams.addparam.php
Edit -- https://main.php.net/note/edit/128384
Del: integrated -- https://main.php.net/note/delete/128384/integrated
Del: useless -- https://main.php.net/note/delete/128384/useless
Del: bad code -- https://main.php.net/note/delete/128384/bad+code
Del: spam -- https://main.php.net/note/delete/128384/spam
Del: non-english -- https://main.php.net/note/delete/128384/non-english
Del: in docs -- https://main.php.net/note/delete/128384/in+docs
Del: other reasons-- https://main.php.net/note/delete/128384
Reject -- https://main.php.net/note/reject/128384
Search -- https://main.php.net/manage/user-notes.php