Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search exclusion does not work as expected #160

Open
frikdt opened this issue Dec 17, 2022 · 2 comments
Open

Search exclusion does not work as expected #160

frikdt opened this issue Dec 17, 2022 · 2 comments

Comments

@frikdt
Copy link

frikdt commented Dec 17, 2022

Quoting from the ddg search syntax help page

cats -dogs Fewer dogs in results

However, when using this pattern the exact opposite happens: The search results include more of the excluded term and not fewer. For example, I have just been running a search for

johan ackerman

and one for

johan ackerman -facebook

I'm adding the generated search urls in case it may be of any use:
1. https://duckduckgo.com/?q=johan+ackerman&t=newext&atb=v260-1&ia=web
2. https://duckduckgo.com/?q=johan+ackerman+-facebook&t=newext&atb=v260-1&ia=web

In the first case the top 10 results contain only one result referencing facebook, and that result is in position 10 on the list; the second search, which I would have expected to contain no result referencing facebook, or one at most, actually contains three such results; and to make matters worse these are at or near the top of the result set in positions 1, 2, and 4, and the word facebook is even highlighted (bold) in each.

Search was done in Firefox 102.5.0esr (64-bit) on Debian GNU/Linux 11 (bullseye).

@BoneTone
Copy link

BoneTone commented Apr 1, 2023

@frikdt you're actually not using the syntax correctly as described in the help page (which you linked). You're simply putting "-facebook" into your search string, when per the syntax help page what you should be using is "-site:facebook.com"

Just for some data, somewhat ironically as I went to test your searches, doing a ddg search with "johan ackerman -facebook" actually didn't provide me a single result from facebook. While searching with just "johan ackerman" as the string, facebook showed up in my results at positions: 9, 26, 27, & 29... I stopped looking after the first 30 results.

All that said, the point still stands that you should modify how you are constructing your search query string to follow the syntax as described in the help page. Also, as a side note, currently and depressingly, ddg doesn't support the syntax you were trying at all, for the exclusion of search "terms" rather than results on a site which you were trying to do, which is does support.

@StarkRG
Copy link

StarkRG commented Jul 30, 2023

Yeah, it still isn't working as the help page suggests it should

Searching for the term "elemental" only shows results for a particular movie produced by Pixar and released by Disney, surely excluding the terms "disney" and "pixar" should remove nearly all results related to that movie, but it does not.
image

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

No branches or pull requests

3 participants