minimalparts / PeARS

Archive repository for the PeARS project. Please head over to https://github.com/PeARSearch/PeARS-orchard for the latest version.
MIT License
17 stars 21 forks source link

Bug associated with duckduckgo redirection #11

Closed minimalparts closed 9 years ago

minimalparts commented 9 years ago

Ok, I'm totally puzzled. I'm playing with the scoring function in scorePages.py, and the following is happening.

I typed in the following three queries, in this order:

"python string replace" -- got results "python unicode" -- no result, redirected to duckduckgo "video games with animals" -- got results page but with the results of the first query -- 'python string replace'

What gets me is that if I modify the scoring function (change the threshold, etc), I can stop this effect. Regardless... it seems some variable is holding search results longer than it should...

stultus commented 9 years ago

I couldn't reproduce this, tried the queries in order.

minimalparts commented 9 years ago

Right, if I use the original scoring function, it doesn't happen. What confuses me is that I'm only changing stuff in the scoreDocs function in scorePages, without touching the best_urls variable. My guess is that I've done something horribly wrong with a global variable.

Anyway, I suggest I make my changes to scoreDocs and open a pull request so you can have a look at it...

minimalparts commented 9 years ago

Well, with my final scoring function, I don't get this bug anymore (although I'm only changing thresholds etc). So there is definitely something dodgy going on but I don't know what. Shall I close this for the minute, or wait a bit just in case the bug reappears?

stultus commented 9 years ago

I'm also not getting this bug. So I'm closing the issue. if it reappears we can open it again.