jenkins-bot has submitted this change and it was merged.
Change subject: Ignore ResultSets that do not return pages
......................................................................
Ignore ResultSets that do not return pages
It happens for geo and namespace queries but could maybe happen in other cases.
We should simply ignore such responses when building the list of hits we want
to store in CirrusSearchRequestSet.
bug: T131283
Change-Id: I978efcfc7d881db647b68b2b6feeb5e5aae54e5b
(cherry picked from commit 0075ab4799dc350efdaecfba8f2bd8576c0aa431)
---
M includes/ElasticsearchIntermediary.php
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Thcipriani: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/ElasticsearchIntermediary.php
b/includes/ElasticsearchIntermediary.php
index 5af76e4..e48ff0b 100644
--- a/includes/ElasticsearchIntermediary.php
+++ b/includes/ElasticsearchIntermediary.php
@@ -676,11 +676,11 @@
$params['hitsOffset'] = intval( $offset );
$params['hits'] = array();
foreach ( $resultData['hits']['hits'] as $hit )
{
- // @fixme: temporary plug
if ( !isset(
$hit['_source']['namespace'] )
|| !isset(
$hit['_source']['title'] )
) {
- wfDebugLog( 'AdHocDebug',
'Unexpected search hit: ' . print_r( $hit, true ) );
+ // This is probably a query
that does not return pages
+ // like geo or namespace queries
continue;
}
// duplication of work ... this happens
in the transformation
--
To view, visit https://gerrit.wikimedia.org/r/280669
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I978efcfc7d881db647b68b2b6feeb5e5aae54e5b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: wmf/1.27.0-wmf.19
Gerrit-Owner: DCausse <[email protected]>
Gerrit-Reviewer: EBernhardson <[email protected]>
Gerrit-Reviewer: Gehel <[email protected]>
Gerrit-Reviewer: Manybubbles <[email protected]>
Gerrit-Reviewer: Smalyshev <[email protected]>
Gerrit-Reviewer: Thcipriani <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits