ooni / explorer

OONI Explorer: uncover evidence of internet censorship worldwide
https://explorer.ooni.org
BSD 3-Clause "New" or "Revised" License
66 stars 37 forks source link

OONI Explorer Domain filter does not ignore Websites Categories filter #845

Open sloncocs opened 1 year ago

sloncocs commented 1 year ago

Expected Behavior

If there is a search by domain, Search should ignore Website Categories filter.

Actual Behavior

If you search by domain and the Website Categories filter doesn't match the category of the domain user is searching for, user gets to the 'No Results Found' page.

Screenshot 2023-03-14 at 19 38 01

Steps to Reproduce the Problem

  1. Set Websites Categories filter to 'Alchohol&Drugs'
  2. Add twitter.com to the Domain field
  3. Press 'Filter Results'

Specifications

NA

GermaVinsmoke commented 1 year ago

But it returns results with "Social Networking" category

sloncocs commented 1 year ago

@GermaVinsmoke, that's right, this happens because twitter.com is categorized as a social network (and is included in this category), thank you for highlighting this!

hellais commented 1 year ago

I'm not sure we should be adding a special case to bypass the category filter if the domain filter is chosen.

Currently the filters are additive and there are other combinations where you might get empty results if you selected two values that have no common elements. For example if you filter by country and then filter by a ASN that doesn't exist in that country.

Making a special case for domain I fear will make it even more confusing as it would not be clear why one of the filters is being ignored.

Moreover, there are use-case for when you actually might want to have both a domain filter and a category_code filter. In the twitter example, we have several twitter URLs that are categorised under a category other than GRP (because we use the category of the content of the profile). Somebody might want to filter by all measurements related to twitter profiles that are talking about political criticism, in which case applying both domain filter and category_code filter would make sense.