Re: [htdig] AltaVista-like ranking?

Daniel Naber (
Sat, 6 Mar 1999 14:24:32 +0100 (MET)

Geoff Hutchison wrote:

> This seems to be a different question. It *does* perform OR by summing
> weights, I'll show you the code if you wish.

Please do so. Perhaps one could change it so something like (pseudo-code):

new_weight = weight1 + weight2

if( weight1 > 0 && weight2 > 0 ) {
        new_weight = new_weight * two_words_matched_factor

two_words_matched_factor could be a new variable that defaults to 1.
If you increase it, matches with more words matched get a higher
ranking. This is just an idea, I did only have a very short look at
the code (and I didn't understand most if it yet).

If this might make sense I could try to add it, but then we should
probably continue on the devel-list.

> However it seems like you're
> saying that changing the order of a query changes the weight of the word.

I didn't mean that (although I wrote it :-)

If it's not clear yet, here's an example:

I search for "search replace lyx" in my local documentation. If I use
"Match: All", I get two results, lets call them document a and document b.

I now go back and search for the same words with "Match: Any". I get 141
matches. Document a ist now at position 19 in the ranking order, document
b is at 28.

To my mind, best behaviour would be: 141 machtes but with documents a and b
at the top.


PGP Key fingerprint = 3D 98 9E D2 00 B6 E0 9D  7E B9 77 23 17 E2 11 6A
To unsubscribe from the htdig mailing list, send a message to containing the single word "unsubscribe" in
the SUBJECT of the message.

This archive was generated by hypermail 2.0b3 on Mon Mar 15 1999 - 08:57:45 PST