EBernhardson has submitted this change and it was merged.

Change subject: Change selectors for extracting search results
......................................................................


Change selectors for extracting search results

The selectors used were pulling in results that arn't main search
results, such as the "People also ask" box which isn't limited by the
site: filter on the query. Make the selector a bit more specific to get
just the main search results.

Change-Id: I4d00eb3eec44f172c6df26487daf6380a4b05d2e
---
M src/RelevanceScoring/RelevanceScoringProvider.php
1 file changed, 1 insertion(+), 2 deletions(-)

Approvals:
  EBernhardson: Verified; Looks good to me, approved



diff --git a/src/RelevanceScoring/RelevanceScoringProvider.php 
b/src/RelevanceScoring/RelevanceScoringProvider.php
index fff9ced..9ac1d40 100644
--- a/src/RelevanceScoring/RelevanceScoringProvider.php
+++ b/src/RelevanceScoring/RelevanceScoringProvider.php
@@ -105,8 +105,7 @@
                 'https://www.google.com/search',
                 [
                     'is_valid' => '#ires',
-                    'results' => '#ires .g',
-                    'results_filter' => '.g-blk',
+                    'results' => '#rso > .g:not(.g-blk), .srg > .g',
                     'url' => 'h3 a',
                     'snippet' => '.st',
                 ],

-- 
To view, visit https://gerrit.wikimedia.org/r/286185
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4d00eb3eec44f172c6df26487daf6380a4b05d2e
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/discernatron
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <ebernhard...@wikimedia.org>
Gerrit-Reviewer: EBernhardson <ebernhard...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to