docbrown/app/services
rhymes 83852038e4
[Search 2.0] Reading list (#13052)
* Step one in populating the reading list with PG

This first attempt tries to recycle the `Search::ArticleSerializer` which is only
used in input in ES, but we're using it in output in PG.
For this reason it's currently 15.55x times slower

* Serialize only what is requested by the frontend

`Search::ArticleSerializer` which is only used in ES in the indexing step aims
to add as much info as possible for broader purposes, in this case
(with serialization in output) we should aim to save only what's requested from
the frontend.

* Optimize selection of articles columns

* Select only needed columns for users

* Compute total of reading list items

* Attach the basic filtering based on PG on the search controller

* Restructure in methods

* Add tags support

* Use LIKE on articles.cached_tag_list

* Fix tags as nil

* Fix default pagination

* Add optional FTS for reading list

* Reworded the tags comment explaining why

* Add index to reactions.status

* Fix total counter in Preact readingList component

* Fix total count in reading list backend search

* Add GIN index to articles.cached_tag_list

* Add service tests

* Add search request specs

* Added missing early return

* Update spec/requests/search_spec.rb

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>

* Extract MAX_PER_PAGE constant and add comments

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
2021-03-24 15:40:00 +01:00
..
articles Make definition of new user configurable (#12999) 2021-03-23 14:13:06 +07:00
audit Rubocop fixes (#11862) 2020-12-11 17:36:42 +03:00
authentication Prevent suspended users from self-deleting and returning (#12503) 2021-02-11 09:28:59 +07:00
badges Split BadgeRewarder into multiple services (#11902) 2020-12-23 09:55:06 -05:00
broadcasts/welcome_notification Workaround for Apple auth problems (still in beta) (#12263) 2021-01-14 09:44:56 -06:00
chat_channels 🚀 Ability to allow tag moderators to create chat channels (#9741) 2020-12-08 13:10:36 +07:00
color Move HexComparer to Hex::Comparer service (#12202) 2021-01-12 11:34:30 -05:00
credits Refactoring user_controller separating some classes to service (#10384) 2020-10-05 10:41:59 +02:00
data_sync/elasticsearch Reindex comments' Elasticsearch doc when commentable is updated (#12330) 2021-01-20 09:44:59 -05:00
edge_cache Refactor cache purging (#12811) 2021-03-02 10:09:05 -05:00
error_messages Move app/labor/error_message_cleaner.rb to service (#11679) 2020-12-02 11:05:36 +07:00
exporter Remove language settings (#12502) 2021-02-04 08:35:00 +07:00
fastly_config Abstract DatadogStatsClient to ForemStatsClient (#12304) 2021-01-27 11:25:44 -05:00
feeds Abstract DatadogStatsClient to ForemStatsClient (#12304) 2021-01-27 11:25:44 -05:00
follows Move app/labor/follow_checker.rb to service (#11613) 2020-12-01 14:14:36 +07:00
giphy Deduplicate giphy_img? function and add tests (#4590) 2019-10-30 11:40:17 -04:00
github Abstract DatadogStatsClient to ForemStatsClient (#12304) 2021-01-27 11:25:44 -05:00
html Code snippet fullscreen icon - setting constraints for size. (#12010) 2021-01-13 15:17:10 +01:00
images Nullify fetch_format for Imgproxy (#12988) 2021-03-16 10:36:27 -04:00
loggers Abstract DatadogStatsClient to ForemStatsClient (#12304) 2021-01-27 11:25:44 -05:00
mailchimp Remove last DatadogStatsClient (#12490) 2021-01-29 16:11:51 -05:00
markdown_processor Fix Markdown parsing of <code> tag (#12797) 2021-03-03 17:41:56 +01:00
mentions Limit mentions in comments (#12923) 2021-03-10 11:23:11 -08:00
moderator reenable article rescoring when moderators flag users (#12983) 2021-03-16 14:04:13 -05:00
notifications Change PushNotifications::Send to use user_ids (#13036) 2021-03-19 13:50:04 -06:00
payments Abstract DatadogStatsClient to ForemStatsClient (#12304) 2021-01-27 11:25:44 -05:00
podcasts [deploy] Ensure podcast episodes are created with processed_html (#10715) 2020-10-07 12:09:36 -04:00
profile_fields Remove contact_consent from users (#12196) 2021-01-12 16:18:47 -05:00
profiles Remove autofollowing hiring tag (#11722) 2020-12-23 12:11:19 +07:00
push_notifications Change PushNotifications::Send to use user_ids (#13036) 2021-03-19 13:50:04 -06:00
re_captcha Split ReCaptcha service and use verbs instead of pronouns (#11706) 2020-12-02 16:50:42 -06:00
search [Search 2.0] Reading list (#13052) 2021-03-24 15:40:00 +01:00
secrets Use a sortable unique ID for the event_id (#3972) 2019-09-09 10:15:12 -04:00
site_configs Add validations to SiteConfig model (#12341) 2021-01-26 09:12:24 +07:00
slack Update article published Slack notifications (#12579) 2021-02-05 09:19:05 -05:00
suggester/users Refactor:Replace Production Check with Average Metrics (#11096) 2020-11-12 10:03:10 -06:00
tag_moderators Move MailchimpBot to Mailchimp::Bot service (#12205) 2021-01-12 10:28:48 -05:00
twitter_client Abstract DatadogStatsClient to ForemStatsClient (#12304) 2021-01-27 11:25:44 -05:00
user_blocks Remove algolia from chat channel memberships (#6323) 2020-02-27 09:59:12 -05:00
user_subscriptions Update CODEOWNERS and team names in TODO comments (#9460) 2020-07-24 12:17:20 +07:00
users Remove buffer gem and related code: step 1 (#12993) 2021-03-24 09:58:38 +07:00
webhook Move Webhook::DispatchEventJob to Sidekiq (#5722) [deploy] 2020-01-27 14:36:27 -05:00
analytics_service.rb Rubocop: enable and fix new Rails cops (#9537) 2020-07-29 11:14:19 +02:00
application_service.rb [deploy] Refactor 🚀 : Replaced Chat Channel Setting page with Preact component. (#8271) 2020-06-10 16:58:37 -04:00
article_api_index_service.rb Optimize column selection for articles belonging to "any" given tag (#12420) 2021-01-25 17:34:10 +01:00
article_with_video_creation_service.rb Upgrade Rubocop to 0.81 (#7219) 2020-04-11 10:10:04 +02:00
bulk_sql_delete.rb Use SQL DELETE statement to delete notifications without a SELECT (#5303) [deploy] 2019-12-31 07:30:27 -06:00
email_digest.rb Refactor:Use dev_to? to Check for DEV (#12083) 2020-12-30 14:34:00 -06:00
email_digest_article_collector.rb Optimization:Select Only Necessary Columns from Ahoy Messages For Digest Emails (#10194) 2020-09-03 16:46:33 -04:00
feature_flag.rb Adds a feature flag for Data Update Scripts (#12641) 2021-02-10 18:22:27 +02:00
flare_tag.rb [deploy] Refactor Flare Tag Class (#9064) 2020-07-01 16:57:03 -04:00
medium_article_retrieval_service.rb Nokogiri::HTML should receive the body, not the response object (#5297) 2019-12-31 08:46:49 -05:00
notifications.rb Remove notifiable access from articles and comments notifications (#5415) [deploy] 2020-01-09 10:19:45 -05:00
rate_limit_checker.rb Add rate limit for new user comments (#12925) 2021-03-16 08:39:31 +07:00
tag_adjustment_creation_service.rb [deploy] Rubocop: fix violations of Layout/LineLength (#9197) 2020-07-08 08:36:36 -05:00
tag_adjustment_update_service.rb [WIP] Allow mods to remove tags and send user notification (#1252) 2018-12-04 16:45:32 -05:00