Closed
Bug 726127
Opened 13 years ago
Closed 13 years ago
update elastic search index with question.num_votes_past_week
Categories
(support.mozilla.org :: Search, defect, P1)
support.mozilla.org
Search
Tracking
(Not tracked)
VERIFIED
FIXED
2012-02-28
People
(Reporter: willkg, Assigned: willkg)
Details
(Whiteboard: u=dev c=search s=2012.4 p=2)
We have a cron job that recalculates questions.num_votes_per_week, but does it directly in the database. Because it's done directly in the database, it doesn't trigger the post_save signal and thus the numbers aren't updated in the elastic search index.
We need to fix this---otherwise that number gets stale.
Possibilities:
1. add to the cronjob some code that also updates the database
2. write another cronjob that updates questions.num_votes_per_week in the index from the database
3. some third thing
Making this a P1 since this should block an ES rollout.
Assignee | ||
Comment 1•13 years ago
|
||
Putting this in the 2012.4 sprint as a 2pter. Pretty sure it should be a 2pter.
Whiteboard: u=dev c=search s=2012.4 p=2
Assignee | ||
Comment 3•13 years ago
|
||
It's "num_votes_past_week" and not "num_votes_per_week". Oops.
Summary: update elastic search index with question.num_votes_per_week → update elastic search index with question.num_votes_past_week
Assignee | ||
Comment 4•13 years ago
|
||
Assignee | ||
Comment 5•13 years ago
|
||
Landed in master in https://github.com/mozilla/kitsune/commit/f4ccd5ed956f8c1bb2b44beab976701e793b20fa
Assuming this cronjob is running on -dev/-stage, to QA:
1. find a support question (or create one) that has no "i have this problem too" votes in the last week. e.g. the text should read "0 new this week"
2. search for that question using the "support question" tab in advanced search.
It should show up in search results.
Search for it again in "support question" tab in advanced search making sure to specify that "votes more than 0".
The question should not show up in the results.
Thus you now have a question where if you search by Votes > 0, it doesn't show up, so if we change that number, then it should show up.
3. vote on the question by clicking on the "I have this problem too" button.
Wait for the cronjob to kick off--in production I think it happens at 1:40 am, though I don't know what timezone that is.
4. If you check the page question is on, it should reflect that it now has a question vote. It'll say something like "1 new this week" next to the "I have this question too" button.
5. Now search for that question using the "support question" tab in advanced search making sure to specify that "votes more than 0"
It should show your question in the results now.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2012-02-28
Comment 6•13 years ago
|
||
I created a question and voted on it: https://support.allizom.org/en-US/questions/778593
I see that 3 new people this week have this question
Searching in advanced search, under Support Questions for 'frosting' gives me results- but if I change it to show More than 1, zero results display
Assignee | ||
Comment 7•13 years ago
|
||
When I do an advanced search under support questions for 'frosting' with votes more than 0, I see it, but when I do votes more than 1, I don't.
Maybe you got some of the votes in before the cron job kicked off and some after? Maybe wait another 24 hours for the cron job to run again and try it then?
Comment 8•13 years ago
|
||
Verified. All of my searches are now giving results- I guess it was a matter waiting for the cron job to run again.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•