Commit graph

27 commits

Author SHA1 Message Date
Vaidehi Joshi
95055b2a89
Remove pro role + expose analytics to all users via dashboard (#13156)
* Remove pro role on user, expose pro dashboard to all users as analytics

* Remove pro from Elasticsearch mappings

* Update user role docs to use :trusted over :pro

* Remove pro from Role model spec

* Remove more references to pro, as noted by @rhymes
2021-03-30 15:02:18 -07:00
Michael Kohl
e258e36c92
Remove language settings (#12502)
* Remove language settings

* Remove more language related code

* Remove leftover spec

* Remove language from ES mapping
2021-02-04 08:35:00 +07:00
Krzysztof Rybka
20a19daa67
Copy username to search_fields (#11045)
* Copy username to search_fields

* Add test for searching by a username

* Add data update script for reindexing users for username search

* Comment out ReindexUsersForProfiles update script

Co-authored-by: rhymes <rhymes@hey.com>
2020-11-02 08:38:15 -06:00
Rafi
d570edcf07
Showing date in listing tile (#10217)
* Showing date in listing tile

* Displaying date in listing tile

1. Sending created_at in listing search API
2. Global util functions for short and long date formatting
3. New date util functions extend timestampToLocalDateTime
4. Converting div to time tag
5. Adding title attribute for date

* originally_published_at column

* Displaying originally_published_at date

* Fixing test in modal

* Fixing all listing test

* Fixing casing of dateTime

* Adding tests for originally_published_at

* Reverting to bumped_at

* Backfilling only published listing

* Removing ReIndexListingWithOriginallyPublishedAt
2020-09-21 10:14:26 +02:00
Michael Kohl
ebc894a07c
[deploy] Changes to profile field indexing (#10313)
* Update mapping

* Update user search serializer

* Add data update script for reindexing users

* Only index roles for persisted users

* Add conditional to profile search serialization

* Update data update scripts

* Update spec for data update script
2020-09-16 17:15:22 -04:00
Molly Struve
83d44401f5
[deploy] Index Reaction created_at Timestamp (#10142) 2020-09-02 12:56:33 -05:00
Molly Struve
d120fc7e54
[deploy] Bug Fix:Rename Listing Search Field in Elasticsearch to Fix Searching (#9609) 2020-08-03 10:18:17 -05:00
Michael Kohl
7f75f99560
[deploy] Rename classified listings (#7910)
* Change models and related files

* Update controllers and specs

* More renaming

* Seek and destroy, I mean search and replace

* Round up the stragglers

* Ground control to Major Travis...

* More fixes

* PR feedback

* Various fixes

* Rename view

* Fix list query builder

* Unify request specs

* Fix some API spec errors

* Fix remaining API specs

* Make spec conform to API

* Fix leftover problems

* Fix JS tests

* Fix column name in select

* Fix API specs

* Fix search specs

* Paging Mr. Travis
2020-05-27 13:35:09 +00:00
Andy Zhao
c42fd3461e
[deploy] Rename positive_reactions_count to public_reactions_count in logic (#7926)
* Rename positive_reactions_count to public_reactions_count

* Add positive reactions count back in so we can remove it

* Use public_category method for reactions

* Add positive_reactions_count in case any old caches rely on it

* Add positive_rxn_count to account for API endpoints

* Remove unused method

* One more spot...

* Add method back in because of caches

* Update specs to match new functionality

* Fix typo

* Remove unused methods
2020-05-26 12:36:28 -04:00
Andy Zhao
e686d63d78
[deploy] Add public reactions count fields to Elasticsearch (#7956)
* Add public_reactions_count field to elasticsearch

* Add new data update scripts and update old ones

* Use BulkIndexWorker to batch indexing

* Use proper search class for handling feed content

* Remove redundant script oops

* Rename data update script and remove old specs

* Combine specs into one file
2020-05-20 13:06:48 -04:00
Sarthak Sharma
90d60bf73f
[deploy] 🚀 Feature: Ability to search discoverable channels and send request to join (#7385)
* Feature 🚀 : Ability to delete messages in chat channels

- Sending message ID to frontend
- Deleting Message
- Use pusher to delete message realtime

* Minor Bug 🐞: Show message action only for current user

- User can delete or edit their own messages

* Test cases added

* Bug 🐞: Update message id for receiver

Message id was not sent to receiver by pusher

* Refactoring🛠: Message controller refactoring

* Test Cases📝 : Specs for Delete message added

* Feature 🚀 : Ability to edit messages

* Test Cases📝 : Specs for Edit message added

* added new column discoverable for public channel and changes in elasticsearch

* fix corrections

* changes in serializer file, added channel_discoverable

* added checkbox with discoverable policy

* changes in code for discoverable channels

* accept and reject member invitation by mod

* add joining request to closed groups

* fixed merge error

* changes in joining member to closed groups

* join to closed group

* changes in message action of joining

* changes in chat upopened json

* 🚀Feature : Ability to search Global Channels

* touch updated_at in after commit update

* 🚀Feature : Ability to send request to discoverable channel

* 🚀Feature : Ability to send request to discoverable channel

* created new route for joining closed channel

* 🚀 Success handle on joining request sent

* removed redundant code

* join_channel improvement, removed authorization for join channel

* list of joining requests

* added joining_request status channels on search list

* changes in mailer and query builder optimized

* 🛠 Adding filter for new Query

* added rspec for add membership method in controller

* rspec for sending join channel request

* invite join request channel list rspec

* test case for query builder discoverable

* viewable and discoverable channel list

* refactored logic for search channels

* 🚀 Check if Request already sent

* 🛠 Optimizing code and making channelButton Component

* 🛠 Optimizing codefor SVG problem

* 🛠 Optimized action.js

* changes in search controller query

* hot fix

* removed unwanted code

* 🛠  Fix the Channel Name problem

* 🛠  Optimizing code further for CodeClimate

* added new column discoverable for public channel and changes in elasticsearch

* fix corrections

* changes in serializer file, added channel_discoverable

* added checkbox with discoverable policy

* changes in code for discoverable channels

* accept and reject member invitation by mod

* add joining request to closed groups

* fixed merge error

* changes in joining member to closed groups

* join to closed group

* changes in message action of joining

* changes in chat upopened json

* touch updated_at in after commit update

* 🚀Feature : Ability to search Global Channels

* 🚀Feature : Ability to send request to discoverable channel

* 🚀Feature : Ability to send request to discoverable channel

* created new route for joining closed channel

* 🚀 Success handle on joining request sent

* removed redundant code

* join_channel improvement, removed authorization for join channel

* list of joining requests

* added joining_request status channels on search list

* changes in mailer and query builder optimized

* added rspec for add membership method in controller

* rspec for sending join channel request

* invite join request channel list rspec

* 🛠 Adding filter for new Query

* test case for query builder discoverable

* viewable and discoverable channel list

* refactored logic for search channels

* 🚀 Check if Request already sent

* 🛠 Optimizing code and making channelButton Component

* 🛠 Optimizing codefor SVG problem

* 🛠 Optimized action.js

* changes in search controller query

* hot fix

* 🛠  Fix the Channel Name problem

* 🛠  Fixing merge problem

* 🛠  Optimizing code further for CodeClimate

* updated UI for membership edit

* fixed test casses and fixed UI for chat_channel_edit

* 🛠napshots added

* test cases fixed

* 🛠 Test cases added for new component

* channel settings accesible only by mod

* 🛠 More Test cases added

* 🛠 Svg code optimized

* 🛠 Svg code optimized in videocontent

* optimized code for search query

* fix test case for query builder

* changes in joining closed channel logic

* refactored join channel

* redirect to edit channel after joining request

* changes in test case for redirect

* optimized code

* 🛠 Eslint bugs fixed

* test case fixed

* optimization

* olving channel repetition problem

* optimization of code for query builder

* changes in query builder

* test cases fixed

* 🛠 Handling reduntant data on frontend

* 🛠  Don't show data if no filter query

* 🛠 Optimized code for fixing bugs and code coverage

* 🛠  Optimizing code further for CodeClimate

Co-authored-by: Parasgr-code <paras.gaur@skynox.tech>
2020-05-11 09:29:15 -04:00
Guilherme Vinicius Moreira
9618ccc927
[deploy] Add new user attributes to elasticsearch (#7123)
* chore(user): add new user attributes to elasticsearch

* Fix schema.rb
2020-04-07 13:16:15 -04:00
Molly Struve
0d3bde3452
[deploy] Index User Roles to use to Filter out banned users (#7014) 2020-04-02 14:11:33 -05:00
Molly Struve
72f04e4a13
Create Reactions Index in Elasticsearch and Serializer (#6899)
* create index for reactions and their reactables, set up serializer

* use respond_to instead of checking type

* remove rubocop change

* add last_indexed_at to reactions index
2020-03-27 18:44:54 -04:00
Molly Struve
974ba032da
Add last_indexed_at Timestamp to all Elasticsearch indexes (#6913)
* add last_indexed_at to all Elasticsearch indexes

* use Time.zone.parse
2020-03-27 18:43:46 -04:00
Molly Struve
d39b2133a4
Add Additional Search Fields and Search Highlighting (#6734) [deploy] 2020-03-20 08:59:58 -05:00
Molly Struve
3161c9d901
Add profile image field to Elasticsearch for presenting after search (#6600) 2020-03-11 18:43:29 -04:00
Molly Struve
3556950322
store flare tag as a hash in Elasticsearch and add spec for putting json into ES (#6538) 2020-03-09 12:06:31 -04:00
Molly Struve
82526989fc
Index Articles and Podcast Episodes to Elasticsearch (#6488) [deploy]
* Index Articles and PodcastEpisodes to Elasticsearch

* add callbacks to podcast episodes and specs

* refactor and clean up serializers
2020-03-06 16:39:36 -05:00
Molly Struve
731b89ca26
Index users into elasticsearch (#6489) [deploy] 2020-03-06 14:12:02 -05:00
Molly Struve
5840d913cf
fix spelling for Elasticsearch user field (#6487) [deploy] 2020-03-05 16:22:23 -05:00
Molly Struve
3703ba3111
Create Feed Content index for Articles and Podcast Episodes and User Index (#6418) [deploy] 2020-03-03 08:00:16 -05:00
Alex
26ed296475
Add published field to ClassifiedListing Search (#6412) [deploy]
* Add published field to ClassifiedListing

* Add back query_conditions conditional

* Don't allow searches for unpublished listings

* Fix comment typo...oops!
2020-03-02 13:56:07 -08:00
Alex
8d7b95ea15
Index ClassifiedListings to Elasticsearch (#6132) [deploy]
* Add ClassifiedListingEsIndexWorker & spec

* Update ClassifiedListing model

- Add es index methods (inline and async)
- Index ClassifiedListing to es after_commit
- Add serialized_search_hash
- Update model specs for new methods
- Add serializers referenced in new model method

* Update specs

* Create DataUpdateScript to index ClassifiedListings

* Fix formatting

* Fix codeclimate :/

* Use match_array instead of keys.sort

* Change find_by! to find

* Update spec

* Update mappings for ClassifiedListing

* Update specs

* Implement refactor with Searchable module
2020-02-19 09:55:37 -05:00
Molly Struve
74118c2d1f
Setup ChatChannelMembership Index (#6152) [deploy] 2020-02-18 13:30:52 -05:00
Alex
d32dc38bed
Move ClassifiedListing mappings to JSON file (#6061) [deploy] 2020-02-13 14:39:39 -08:00
Molly Struve
9f4dad77da
Move Elasticsearch mappings to config folder as json file (#6051) [deploy] 2020-02-13 11:33:47 -05:00