-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FEATURE: Order by emotion on /filter #913
Conversation
emotions.each { |emotion| expect(filters).to include("order:emotion_#{emotion}") } | ||
end | ||
|
||
it "filters topics by emotion" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I am confused a bit about ordering vs filtering here. The admin report for a given emotion should point to a filtered list of topics where there is a match for that emotion, right? For that, would we need an explicit filter like emotion:disgust
?
We certainly want order:emotion_disgust
, no doubt, but I think we also need the filtering...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will all be accessed from a link, they aren't supposed to be typed, so do we really need the double emotion:disgust order:emotion_disgust
?
Filter and Order here are a bit fuzzy. Ordering works, you simply show first topics where most posts have that emotion. But filter means you need to set a threshold, as every classification contains some of that emotion as an infinitesimal decimal. What do you suggest? Also worth noting that emotion is per post, while filter acts on topics, so we need a way to translate the concepts.
I'd go with a having
clause limiting topics to where the emotion is presented with a score of at least 10% in at least 5% of the replies built-in into the ordering, at least for starters. Expect those to be adjusted over time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, not a fan of the double keywords. Not a fan of order:X
filtering out results either because it goes against what order does in other places. I don't have a definitive answer, maybe in the short-run we go with the order:
keyword only and accept it is exceptional.
Regarding the cutoff, I'm happy with your suggestion. The main thing is that we need to use the same threshold that we use in the admin report:
The graph here will likely change to accomodate the additional emotion dimensions, but, if it will still show a count per emotion, we need to respect that same count in the filtered view.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That graph is going the way of the dodo. We will replace it with a table that will contain the links to this new filter.
This PR is only adding the filter, but they won't be used yet.
Added the proposed filter in 38d14e4, see the updated tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's try it!
No description provided.