flarum / flarum/issue-archive

Implement more gambits

Open
#418 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue type/feature
Dominant language
No language data
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

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:

  • Multiple author search, separated by commas (author:username1,username2)
  • created:date where date is the same syntax as on GitHub
  • updated:date
  • contributor:username1,username2
  • replies:number where number is the same syntax as on GitHub
  • ip:123.123.123.123

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing gambits in core and the extensions, then inspect the /api/users?q=whatever user-search entry point. Map how the requested author, date, contributor, reply-count, IP, title, and group filters would fit the existing search behavior; done means the scope and implementation path for the broader gambit set are agreed.

Written by the indexing model from the issue text.

Assessment

Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.