Commit Graph

18 Commits (36ccdcc9e12d35399742cbe05c2589d69dbbbc99)

Author SHA1 Message Date
Eugen Rochko 0f3fef6fda
Change search modifiers to be case-insensitive (#30865) 6 months ago
Jeong Arm ad44d832b8
Support "in:public" search filter (#26976) 1 year ago
Eugen Rochko 3a679844e4
Fix `account_id`, `max_id` and `min_id` params not working in search (#26847) 1 year ago
Eugen Rochko a90b0056cc
Fix `#hashtag` matching on individual components in search (#26835) 1 year ago
Eugen Rochko ece1ff77d6
Add `in:library` syntax to search (#26760)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
1 year ago
Eugen Rochko 68b4e36c82
Fix `#hashtag` matching non-hashtagged posts in search (#26781) 1 year ago
Eugen Rochko e52d0494ee
Fix `before:`, `after:` and `during:` failing when time zone not set (#26782) 1 year ago
Eugen Rochko e754083e8a
Fix unmatched quotes and prefixes causing search to fail (#26701) 1 year ago
Eugen Rochko 0008458128
Fix search queries with slash causing or-condition (#26699) 1 year ago
Eugen Rochko bba76e7267
Change `language:` to attempt to match to a known value in search (#26663) 1 year ago
Eugen Rochko 67166de865
Add `from:me` syntax to search (#26660) 1 year ago
Eugen Rochko 822a35b9d5
Fix not being able to negate prefix clauses in search (#26672) 1 year ago
jsgoldstein 30c191aaa0
Add new public status index (#26344)
Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
1 year ago
0x2019 012537452a
Fix error resposes for `from` search prefix (#17963)
* Fix error responses in `from` search prefix (addresses mastodon/mastodon#17941)

Using unsupported prefixes now reports a 422; searching for posts from an
account the instance is not aware of reports a 404. TODO: The UI for this
on the front end is abysmal.

Searching `from:username@domain` now succeeds when `domain` is the local
domain; searching `from:@username(@domain)?` now works as expected.

* Remove unused methods on new Error classes as they are not being used

Currently when `raise`d there are error messages being supplied, but
this is not actually being used. The associated `raise`s have been
edited accordingly.

* Remove needless comments

* Satisfy rubocop

* Try fixing tests being unable to find AccountFindingConcern methods

* Satisfy rubocop

* Simplify `from` prefix logic

This incorporates @ClearlyClaire's suggestion (see
https://github.com/mastodon/mastodon/pull/17963#pullrequestreview-933986737).

Accepctable account strings in `from:` clauses are more lenient than
before this commit; for example, `from:@user@example.org@asnteo +cat`
will not error, and return posts by @user@example.org containing the
word "cat". This is more consistent with how Mastodon matches mentions
in statuses. In addition, `from` clauses will not be checked for
syntatically invalid usernames or domain names, simply 404ing when
`Account.find_remote!` raises ActiveRecord::NotFound.

New code for this PR that is no longer used has been removed.
3 years ago
Jeong Arm 9a015e43ef
Add `from:` query operator to search syntax (#16526)
* Add 'by:userhandle' parameter to search api

* Use search syntax for "by" prefix

* Codeclimate

* Use 'from' instead of 'by'
3 years ago
Eugen Rochko bb27ca14ef
Fix error when searching for empty phrase (#12711)
Fix #12619
5 years ago
Eugen Rochko 70da6d6630
Fix accounts search by full/partial display name and others (#11580)
- Restrict followers counts to local users to minimize local advantage
- Fix emoji shortcodes causing error in search
- Fix search syntax parse errors not being caught
5 years ago
Eugen Rochko b9fbcbfe4e
Add search syntax for operators and phrases (#11411) 6 years ago