Skip to content

Conversation

@odesenfans
Copy link
Collaborator

@odesenfans odesenfans commented Apr 27, 2023

Problems:

  • the tags filter in /messages.json is not additive and filters out
    messages that don't match all the specified tags, instead of returning
    messages that have at least one matching tag.
  • filtering posts by tags filters out all results.

Solution: fix the SQL queries, the filter was comparing the specified
tags against the post tags as strings instead of checking for
inclusion. We now use the '?|' operator to check if the message/post
tags match at least one of the specified tags.

@odesenfans odesenfans force-pushed the od-reactivate-filtering-by-tags branch 2 times, most recently from 44b2d28 to 933e0ec Compare April 27, 2023 22:12
@odesenfans odesenfans changed the title Fix: filtering by tags on /posts.json Fix: filtering by tags Apr 27, 2023
Problems:
* the `tags` filter in /messages.json is not additive and filters out
  messages that don't match all the specified tags, instead of returning
  messages that have at least one matching tag.
* filtering posts by tags filters out all results.

Solution: fix the SQL queries, the filter was comparing the specified
tags against the post tags as strings instead of checking for
inclusion. We now use the '?|' operator to check if the message/post
tags match at least one of the specified tags.
@odesenfans odesenfans force-pushed the od-reactivate-filtering-by-tags branch from 933e0ec to 4607d00 Compare April 27, 2023 22:27
@odesenfans odesenfans merged commit e3b482b into master Apr 27, 2023
@odesenfans odesenfans deleted the od-reactivate-filtering-by-tags branch April 27, 2023 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants