Depth in results rank

Post Reply
davidtg
Posts: 47
Joined: Wed Aug 08, 2001 4:07 pm

Depth in results rank

Post by davidtg »

Hi,

I just want to check if there is some way to factor Depth into the result rank? Or something similar as we'd like to be able to give higher ranks to pages proximity to the base URL.

I don't know if this would be the solution but what we're finding is a lot of far-flung Word/PDF/PPT documents dominating search results. Gaming the Meta tags will only go so far.

Do you think it possible to make these non-html files get a worse rank...maybe a tweak within the search script??

Thanks, David
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Depth in results rank

Post by mark »

Do an order by with $rank and Depth. In the search script where it's setting sqlorder:

<case "r"><$liketype=likep><$sqlorder=" order by $$$$rank+(20*Depth)">
<default><$order="r"><$liketype=likep><$sqlorder=" order by $$$$rank+(20*Depth)">

To display that rank change the rank in select fields to "$$$$rank-(20*Depth) rawrank"

Ranking by extension (file type) would require generating a number based on the url and using that in the rank order formula. The Webinator tables don't provide any place to store such a number.
davidtg
Posts: 47
Joined: Wed Aug 08, 2001 4:07 pm

Depth in results rank

Post by davidtg »

Thank you - this is getting me somewhere. I've tested and it does an interesting influence of the ordering.

But I have confusion....

Your suggestion appears to change the sort order not the rank value. Is the rank value difficult to change for each result?

Something like $newrank = $rawrank - (20*Depth) - (value_pdf_extension)

But I'm unsure where would it be best in the script to try this. Or if in you last sentence this isn't possible.

Again, your help is very appreciated. David
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Depth in results rank

Post by mark »

You have to do the second mod I mentioned (to the selected fields) to get the same rank for display that was used for ordering.

For the rank order you have to do a formula in sql math. I don't think there's a practical, if any, way to turn the url extension into a number for use in the rank formula.
davidtg
Posts: 47
Joined: Wed Aug 08, 2001 4:07 pm

Depth in results rank

Post by davidtg »

I think I understand...

So the returned data set is ranked/ordered and that is the way it is - can't change this after the sql call is made.

I'd need to put something else in the $sqlorder string to influence further....

David
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Depth in results rank

Post by mark »

Right. Though it would be possible to get the whole result set back, futz with the rank values, re-sort, repaginate, then display. But that would perform slower and would be a complete change to how the search script works and is well beyond the scope of this.
Post Reply