|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-12-29 13:17 UTC] tony2001@php.net
-Status: Open
+Status: Feedback
[2014-12-29 13:17 UTC] tony2001@php.net
[2014-12-30 06:50 UTC] marcel at berteler dot co dot za
[2015-01-11 04:22 UTC] pecl-dev at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 14:00:01 2025 UTC |
Description: ------------ When doing multiple queries with a few filters that all queries share it is really useful to be able to remove a specific filter. In order for this to work, the setFilter* functions should return the key of the internal array used to store the filters. An additional function ClearFilter which takes the array key as a parameter can then be used to clear a specific filter. Test script: --------------- // set various filters $this->sphinxSearch->setFilter('facility_id', array($facility_id)); // apply additional filter to only include services without exceptions $filterKey1 = $this->sphinxSearch->setFilter('exc', array(0)); // run first query $servicesCorrectCount = $this->sphinxSearch->search($this->query); // now remove those filters $this->sphinxSearch->clearFilter($filterKey1); // apply filter to only count services with exceptions $filterKey2 = $this->sphinxSearch->setFilter('exc', array(1)); // run second query $servicesExceptionCount = $this->sphinxSearch->search($this->query);