flytaly / reddit-post-notifier

Firefox/Chrome extension that watches for posts in given subreddits or reddit searches
Mozilla Public License 2.0
20 stars 5 forks source link

Boolean operators search #9

Closed Duos-Apros closed 4 years ago

Duos-Apros commented 4 years ago

Thanks for this add-on. For the "Watch for specific posts in the subreddit", is the add-on designed to handle Boolean operators? For example, using the reddit search wiki (https://www.reddit.com/wiki/search), I put the following settings:

Watch for specific posts in the subreddit: Name: ABC Subreddit: XYZ Search query: title: "keyword 1" OR "keyword 2" OR "keyword 3" OR "keyword 4" OR "keyword 5"

The problem is that the search results from the add-on show post titles that are not related to any of the keywords. Am I doing something wrong?

flytaly commented 4 years ago

This should work if you remove spaces between title: and "keyword ..." and repeat title (if needed) every time

Search query: title:"keyword 1" OR title:"keyword 2"

This addon asks reddit search via URL. And as you can see below following URLs give 2 different results for some reasons: 1: incorrect: r/javascript/search?sort=new&restrict_sr=on&q=title: react OR title: svelte 2: correct: r/javascript/search?sort=new&restrict_sr=on&q=title:react OR title:svelte

Duos-Apros commented 4 years ago

Worked like charm. Spasibo!