Donmai

Comment meta-tags and comment searching

Posted under Bugs & Features

Related to topic #13646.

I realized after blasting a bunch of MD5 mismatch and image sample comments (even with do not bump post set), that doing so completely destroys searching by posts...

(order:comment and commenter:Brokeneagle98)

...or comments...

http://danbooru.donmai.us/comments?group_by=comment&search%5Bpost_tags_match%5D=girls_und_panzer

...however, some comment searches aren't destroyed...

http://danbooru.donmai.us/comments?group_by=post&tags=girls_und_panzer

For the first two, would it be desired to filter out comments where the "do not bump post" is set, or would people still want to see them...? Another possibility is for an additional search parameter where the value of the "do not bump post" value could be specified....

Thoughts?

So posts have two timestamps, last_commented_at and last_comment_bumped_at. order:comment orders by last_commented_at, /comments?group_by=post orders by last_comment_bumped_at, and /comments?group_by=comment orders by comment id. I think changing the meaning of order:comment could break people's expectations so issue #2855 would just add order:comment_bumped (order by most recently bumped posts).

For the first two, would it be desired to filter out comments where the "do not bump post" is set, or would people still want to see them...? Another possibility is for an additional search parameter where the value of the "do not bump post" value could be specified....

Do you mean a comment:bumping / comment:nonbumping metatag for filtering e.g. commenter:BrokenEagle98, or an option for filtering on the /comments/search page? A metatag is possible but filtering on the search page would be easier to use, I think.

evazion said:

Do you mean a comment:bumping / comment:nonbumping metatag for filtering e.g. commenter:BrokenEagle98, or an option for filtering on the /comments/search page? A metatag is possible but filtering on the search page would be easier to use, I think.

The order:comment_bumped solves the first.

For the second, I was thinking of adding a selector on the comments search page. It would also add a new parameter for the comment model's search function like bumped, which would be passed in as a URL argument like search[bumped].

  • <BLANK>, i.e. would select either type of comment (no search[bumped] argument)
  • Bumped, i.e. would only select bumped comments (search[bumped]=true)
  • Nonbumped, i.e. would only select nonbumped comments (search[bumped]=false)

issue #2856 would add a search[do_not_bump_post] flag. It's a terrible name, but I went with it to maintain consistency with the naming convention in /comments.json?group_by=comment.

Also added are is_deleted and is_sticky flags and ordering options. Note that these params won't work with /comments?group_by=post since that doesn't use `Comment#search`. It wasn't immediately obvious to me how to make that work so I punted on it.

1