Closed jlancaster7 closed 2 years ago
success
success
success
success
Pusher: @jlancaster7, Action: pull_request
success
success
success
success
Pusher: @jlancaster7, Action: pull_request
success
success
success
success
Pusher: @jlancaster7, Action: pull_request
success
success
success
success
Pusher: @jlancaster7, Action: pull_request
Please don't make fun of my code, I'm not a real dev hides under desk.. also, I'm disappointed with Githubs lack of emoji's :(
Joking aside, the main changes were updates to the sorting mechanism in "get_discovery_feed" and then how we paginate across the feed/get endpoint. I changed it to 'created_at' vs 'id', because the id in theory doesn't necessarily correspond to when something was posted, and more corresponds to when we a given post was uploaded by our system. I'm aware there could be collisions in using created_at, but as our datetimes record down to the millisecond, its pretty unlikely.
The second major change is adding an ability to search posts with a company ticker by submitting a ticker through 'company_ticker'. An issue that came up was that certain tickers can also be words that people use in normal conversations (U, A, AN, AM, HE) end up being returned if we just search on ticker. The other option is to only return tickers that have '$' in front of it, as is the standard on Twitter but not necessarily on other platforms. My temporary solution, as I didn't want to just search with '$' concat'd onto the ticker (eg. $U), was to check if the ticker submitted is in our list of common 'stopwords' and if it is, to only search the ticker with the '$' concat'd onto the ticker. If its not in our list of stopwords, then to search it with and without the '$' concat'd onto it. I would have make my list of stopwords its own table.. but tbh.. I don't know how to use alembic and create a new table in our environment.