Commit Graph

41 Commits (49cbee383612bb58efeebd3377acc0d618fbf80e)

Author SHA1 Message Date
Eugen Rochko 872145d1c2
Fix not being able to invoke phrase search using unicode quotation marks ()
Eugen Rochko 2304cc6456
Fix bad search type heuristic ()
jsgoldstein 30c191aaa0
Add new public status index ()
Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Matt Jankowski 2e1391fdd2
Fix `Naming/MemoizedInstanceVariableName` cop ()
jsgoldstein 99be47f8b9
Change searching with # to include account index ()
Daniel M Brasil 383c00819c
Fix `/api/v2/search` not working with following query param ()
jsgoldstein 4581a528f7
Change account search to match by text when opted-in ()
Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
Nick Schonning c66250abf1
Autofix Rubocop Regex Style rules ()
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Takeshi Umeda 38c84f57b6
Refactoring relations_map ()
Nick Schonning e2a3ebb271
Autofix Rubocop Style/IfUnlessModifier ()
luigi eb51e43fb4
Optimize some regex matching ()
* Use Regex#match?

* Replace =~ too

* Avoid to call match? from Nil

* Keep value of Regexp.last_match
ThibG 27ea7c13a5
Fix hashtag search performing account search as well ()
Eugen Rochko c3965e28b3
Fix returning results when searching for URL with non-zero offset ()
Fix 
Eugen Rochko bbf926b1c0
Fix error when using search API with no query ()
Fix 
Eugen Rochko ab33c4df94
Add `exclude_unreviewed` param to `GET /api/v2/search` REST API ()
Make it so normal search returns even unreviewed matches, but
autosuggestions do not.

Fix 
Eugen Rochko 50edf84898
Fix search API not resolving URL when type is given ()
Fix 
Eugen Rochko cc0a55cf9a
Add more accurate hashtag search ()
* Add more accurate hashtag search

Using ElasticSearch to index hashtags with edge n-grams and score
them by usage within the last 7 days since last activity. Only
hashtags that have been reviewed and are listable can appear in
searches, unless they match the query exactly

* Fix search analyzer dropping non-ascii characters
Eugen Rochko 70da6d6630
Fix accounts search by full/partial display name and others ()
- 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
Eugen Rochko b9fbcbfe4e
Add search syntax for operators and phrases ()
Eugen Rochko 67b3b62b98
Improve blocked view of profiles ()
* Revert "Fix filtering of favourited_by, reblogged_by, followers and following ()"

This reverts commit 120544067f.

* Revert "Hide blocking accounts from blocked users ()"

This reverts commit 62bafa20a1.

* Improve blocked view of profiles

- Change "You are blocked" to "Profile unavailable"
- Hide following/followers in API when blocked
- Disable follow button and show "Profile unavailable" on public profile as well
ThibG 62bafa20a1 Hide blocking accounts from blocked users ()
* Revert "Add indication that you have been blocked in web UI ()"

This reverts commit bd02ec6daa.

* Revert "Add `blocked_by` relationship to the REST API ()"

This reverts commit 9745de883b.

* Hide blocking accounts from search results

* Filter blocking accouts from account followers

* Filter blocking accouts from account's following accounts

* Filter blocking accounts from “reblogged by” and “favourited by” lists

* Remove blocking account from URL search

* Return 410 on trying to fetch user data from a user who blocked us

* Return 410 in /api/v1/account/statuses for suspended or blocking accounts

* Fix status filtering when performing URL search

* Restore some React improvements

Restore some cleanup from bd02ec6daa

* Refactor by adding `without_blocking` scope
Eugen Rochko e7f20cc43f
Add type, limit, offset, min_id, max_id, account_id to search API ()
* Add type, limit, offset, min_id, max_id, account_id to search API

Fix 

* Make the offset work on accounts and hashtags search as well

* Assure brakeman we are not doing mass assignment here

* Do not allow paginating unless a type is chosen

* Fix search query and index id field on statuses instead of created_at
Jeong Arm 511231ce57 Skip full text search if failed ()
* Skip full text search if failed

* Move rescue block to "perform_statuses_search!"
ThibG af912fb308 Allow accessing local private/DM messages by URL ()
* Allow accessing local private/DM messages by URL

(Provided the user pasting the URL is authorized to see the toot, obviously)

* Fix SearchServiceSpec tests
ThibG 1c379b7ef4 Remove extra spaces from search API queries and public account headers (fixes ) ()
Aboobacker MK 49092945ab Fix 500 while searching after deleting a post ()
Fixes 
Eugen Rochko 3ebc0ad4d3
Full-text search for authorized statuses ()
* Add full-text search for authorized statuses

- Search API will return statuses that match the query
- Only for logged in users
- Only if you are author of the status,
- Or you were mentioned in it
- Or you favourited or reblogged it
- Configuration over `ES_ENABLED`, `ES_HOST`, `ES_PORT`, `ES_PREFIX`
- Run `rails chewy:deploy` to create & populate index

Fix 
Fix 
Fix 

* Add commented out docker-compose configuration for ES container

* Optimize index import, filter search results

* Add basic normalization to the index

* Add better stemming and normalization to the index

* Skip webfinger request if search query includes both @ and a space

* Fix code style

* Visually separate search result sections

* Fix code style issues
Akihiko Odaki 17cecd75ca Rename FetchRemoteResourceService to ResolveURLService ()
The service used to be named FetchRemoteResourceService resolves local
URL as well.
Eugen Rochko e20895f251
Add list of lists component to web UI ()
* Add list of lists component to web UI

* Add list adding

* Add list removing

* List editor modal

* Add API account search limited by following=true relation

* Rework list editor modal

* Remove mandatory pagination of GET /api/v1/lists/:id/accounts

* Adjust search input placeholder

* Fix rspec ()

* i18n: (zh-CN) Add missing translations for  ()

* i18n: (zh-CN) yarn manage:translations -- zh-CN

* i18n: (zh-CN) Add missing translations for 

* Fix some issues

- Display loading/missing state for list timelines
- Order lists alphabetically in overview
- Fix async list editor reset
- Redirect to /lists after deleting unpinned list
- Redirect to / after pinning a list

* Remove dead list columns when a list is deleted or fetch returns 404
Matt Jankowski 20c37ed0f9 Add specs (and refactor) of FetchRemoteResourceService and SearchService ()
* Coverage for fetch remote resource service

* Refactor fetch remote resource service

* Coverage for search service

* Refactor search service
Eugen Rochko d93d6f5124 Fix reworked search
Eugen Rochko 05cf086766 New API method: /api/v1/search
Returns accounts, statuses, hashtags arrays
Eugen Rochko ad0d82d3ce Make account search blazing fast and rank followers/followees higher in the results
Eugen Rochko 175a9b9caa Fix - Style OAuth authorized applications page
Add ability to search accounts by display name
Eugen Rochko 6cdcac1396 Fix - arrow keys to navigate media; fix - non-exact matches no longer
overshadow requirement for remote-lookup
Eugen Rochko 58b3f4fd67 Fix - avatar errors no longer prevent remote accounts from being saved
(without avatar). Also improved search position of exact matches
Eugen Rochko 054138797f Fix - Strip first @ from search query, don't search accounts if it begins with #
Eugen Rochko fc90d38893 Moving some counter queries out of subqueries in the API
Eugen Rochko fdc17bea58 Fix rubocop issues, introduce usage of frozen literal to improve performance
Eugen Rochko afded319d2 Add limit to search results
Eugen Rochko 09218d4c01 Use full-text search for autosuggestions