EBernhardson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/317026

Change subject: page id was renamed to docId in runSearch.php output
......................................................................

page id was renamed to docId in runSearch.php output

Change-Id: Ib375c4525644384e138a425bbc8d2d668e9da73a
---
M engineScore.py
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/relevanceForge 
refs/changes/26/317026/1

diff --git a/engineScore.py b/engineScore.py
index 6e6543a..9dac6df 100755
--- a/engineScore.py
+++ b/engineScore.py
@@ -126,7 +126,7 @@
             if 'error' not in decoded:
                 for hit in decoded['rows']:
                     hits.append({
-                        'pageId': hit['pageId'],
+                        'docId': hit['docId'],
                         'title': hit['title'],
                     })
             results[decoded['query']] = hits
@@ -279,7 +279,7 @@
         clicks = self._sessions[sessionId]['clicks']
         score = 0.
         for hit, pos in zip(hits, itertools.count()):
-            if hit['page_id'] in clicks:
+            if hit['docId'] in clicks:
                 score += self.factor ** pos
                 self.histogram.add(pos)
         return score

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib375c4525644384e138a425bbc8d2d668e9da73a
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/relevanceForge
Gerrit-Branch: master
Gerrit-Owner: 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