CirrusSearch
Elasticsearch-powered search for MediaWiki
|
Handles logging information about requests made to various destinations, such as monolog, EventBus and statsd. More...
Public Member Functions | |
hasQueryLogs () | |
addRequest (RequestLog $log, UserIdentity $user=null, $slowMillis=null) | |
appendLastLogPayload ( $key, $value) | |
getQueryTypesUsed () | |
Report the types of queries that were issued within the current request. | |
setResultPages (array $matches) | |
This is set externally because we don't have complete control, from the SearchEngine interface, of what is actually sent to the user. | |
Handles logging information about requests made to various destinations, such as monolog, EventBus and statsd.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. http://www.gnu.org/copyleft/gpl.html
CirrusSearch\RequestLogger::addRequest | ( | RequestLog | $log, |
UserIdentity | $user = null, | ||
$slowMillis = null ) |
RequestLog | $log | The log about a network request to be added |
User | null | $user | The user performing the request, or null for actions that don't have a user (such as index updates). |
int | null | $slowMillis | The threshold in ms after which the request will be considered slow. |
CirrusSearch\RequestLogger::appendLastLogPayload | ( | $key, | |
$value ) |
string | $key | |
string | $value |
CirrusSearch\RequestLogger::getQueryTypesUsed | ( | ) |
Report the types of queries that were issued within the current request.
CirrusSearch\RequestLogger::hasQueryLogs | ( | ) |
CirrusSearch\RequestLogger::setResultPages | ( | array | $matches | ) |
This is set externally because we don't have complete control, from the SearchEngine interface, of what is actually sent to the user.
Instead hooks receive the final results that will be sent to the user and set them here.
Accepts two result sets because some places (Special:Search) perform multiple searches. This can be called multiple times, but only that last call wins. For API's that is correct, for Special:Search a hook catches the final results and sets them here.
ISearchResultSet[] | $matches |