Closed Bug 781811 Opened 12 years ago Closed 12 years ago

[ia] Add number of helpful votes to document search mapping for article sorting

Categories

(support.mozilla.org :: Search, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED
2012.16

People

(Reporter: rrosario, Assigned: rrosario)

References

Details

(Whiteboard: u=user c=wiki p=2)

Add something like 'document_helpful_votes_30days' to the Document mapping.

I thought this was already there and went to sort by it for the article listing pages and realized it isn't there at all. First we need to figure out what we actually want to index. The requirement currently says:

"In phase 1, the default sort order will be by Popularity. This calculation will be based on total votes with weighting for helpfulness. This will negate the need for total page views. We will base this on 30 days historically."

Matt_G: can you clarify this? Can we just sort by the number of helpful votes in the last 30 days? Or do we need to subtract unhelpful votes? Or some other more complicated math?

Once we clarify that, we need to make the mapping and extract change. Then we can push that with a new WRITE_INDEX, do a full reindex, then update the READ_INDEX along with using this new field for sorting in the article listing page. Due to the reindex dance, I am making this a 2pt.
From Bug 768918 Comment 9 (Ibai):
"Matt, Verdi and myself have talked about it and decided to use Amount of Votes as a reference of popularity instead of Pageviews."

So are we just doing total number of votes? Or total number of helpful votes?
For the previous bug we just decided that total votes is a good proxy of visitors.

In this particular case we want to weight by helpfulness. Matt wrote that requirement, my opinion is that we should only focus on Helpful votes for the ranking. The more positive votes an article has, the higher it shows in the ranking. 

We will use the negative ones to improve the content.
Sounds good.

To summarize: we will index the number of helpful votes in the last 30 days and sort by that.

This may or may not require reindexing documents on cron. I need to think about it a little.
Indexing just by the number of positive votes sounds like a good plan to me.

Two questions came to mind:

1. Will this sort order be mirrored on all locales? And when an article in one locale gets voted, will this vote contribute towards increasing the article’s rating across every locale?

2. On the very rare occasions that a few articles get the same number of votes and are displayed on one page, how will we sort them?
This will require reindexing the kb on cron because otherwise the helpful votes data will get stale. Maybe once a day is a good enough frequency?
I think once a day would be plenty. I doubt the helpful votes data will fluctuate that much from day to day.
No longer depends on: 778753
(In reply to Bram Pitoyo [:bram] from comment #4)
> 1. Will this sort order be mirrored on all locales? And when an article in
> one locale gets voted, will this vote contribute towards increasing the
> article’s rating across every locale?

Each translation will have it's own number of votes.


> 2. On the very rare occasions that a few articles get the same number of
> votes and are displayed on one page, how will we sort them?

Unless you can think of a good second sort, I think this is just undefined, whatever the search engine decides to give us. Also, I think it is very unlikely.
Just landed in production:

https://github.com/mozilla/kitsune/commit/d96e2fde4409a0dab3ecd31b104444716bdf802c
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
FTR, we didn't have to create a new index for the new mapping because we were just adding an integer field and the inferred mapping works.
You need to log in before you can comment on or make changes to this bug.