flarum / issue-archive

0 stars 0 forks source link

Implement more gambits #418

Open tobyzerner opened 9 years ago

tobyzerner commented 9 years ago

Gambits are little pieces of search criteria that can be specified in the search string. Just like GitHub's search syntax.

Right now we've only implemented a few: is:unread and author:username in core, and tag:foo,bar, is:followed, is:ignored, is:sticky, and is:locked in their respective extensions.

We probably want to implement the following gambits:

Pending flarum/framework#257, we will also want to have an in:title gambit which scopes fulltext search to only look in discussion titles.

We should also implement more gambits when searching users (i.e. /api/users?q=whatever), such as for filtering by group.

This is a precursor to an extensible advanced search interface which will come later.

Albert221 commented 8 years ago

See flarum/framework#703.

BartVB commented 7 years ago

Can I put in a request for searching by IP address? We use that to track down spammers and their posts. Obviously this should be behind some kind of permission.

franzliedke commented 7 years ago

@BartVB Good idea. If @tobscure agrees, we can add that to the list at the top of this issue.

luceos commented 5 years ago

Contributor or participant is related to the author of a post, contrary to the current Author Gambit for Discussions.

askvortsov1 commented 4 years ago

This post was made a while ago, and hasn't been updated recently. The following have already been updated:

There are a few more things to consider:

luceos commented 4 years ago

Looking at your discussion on internals (next time please stick to the issue, so that we are not scattering our path of thought everywhere), I think (in my opinion) we need to decide on one date; which to me would make most sense for created_at. I don't think anyone would ever have any need for the other fields and if they do they can either:

Having said that, I like what discord did and the argument @datitisev made; keep it stupid simple. Increasing nesting of the namespace (semicolon) will not do our app any good. For this reason I think the PR flarum/framework#2027 should be closed.

PS. as a general remark, if you foresee these kind of decisions it's often better to first discuss the options and then do a PR. Otherwise you spent valuable time on something that might be discarded while risking feeling burned/overruled by a core team decision. Having said so, your efforts are immensely valued, keep it up!

askvortsov1 commented 4 years ago

Sounds good! Just to clarify, are you proposing splitting created into multiple gambits to support created_before and created_after? I agree that nesting is kinda gnarly, but I'm also not sure how I feel about having 6 different date gambits.

PR flarum/framework#2027 doesn't have nesting, and I'm not sure that "Updated" isn't useful: It can be good for seeing what conversations / users / areas of discussion are active / inactive with more specificity than just sorting it.

If y'all think we should close it, I'm perfectly fine with that: it was a good opportunity to get to know a part of the codebase I'd never seen before.