alexander-bauer/distru

result ranking

Closed this issue · 5 comments

Results should be ranked in order of relevance. Exactly what relevance is will take some figuring.

This isn't an idea for particularly fixing this issue, but it's something that needs to be taken into consideration when ranking results. Whenever someone clicks on a link to go to a page, a number in the config file for that specific page should increase by one. When deciding result ranking, generally, when a page is used more often, it's probably a better page to visit.

@lukevers How should we share those visits among different instances, though? If they're not shared, then the owner of the instance is the only one benefited by the clicking. If they are shared, then what's to prevent clickbots, or other index corruption?

Also, would it be possible to actually record which link was clicked?

@SashaCrofter Yeah, I wasn't sure about that either. It's an idea though. We really need a better way of deciding how important a page is when searching. I was thinking something having to do with the following things:

A: The number of words on the page
B: The number of times "x" is on the page
C: The number of times a page is clicked on

Now that you bring up your concern, I agree with it. But my idea was to take these things, and possibly some other values, and come up with some sort of equation that ranks each page.

@lukevers Generally, pages are ranked in "popularity" by the number of sites which link to them. That's long been an issue, #22, but I think it's completely doable. It's a relatively small technical matter to keep track of which sites have linked to which. (Perhaps we can keep a map[string]struct{} on any given site object, containing a list of all of the sites that have referred to it. Then the number of sites, and hence the "popularity," can be gotten with a simple length(referrers) call.)

That must either be more or less important than the relevant words on the page, though, and I'm not completely sure how to balance them.

This is in a state of Pretty Good™. I'm closing it for the time being.