tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Support for boolean queries in apropos

On Mon, Mar 12, 2012 at 10:31 AM, Alan Barrett <> 
> On Sun, 11 Mar 2012, Mouse wrote:
>> Pages either satisfy the query, in which case there is nothing to rank
>> them based on, or they don't, in which case they should not be mentioned in
>> the output at all.
> I think that pages can be ranked based on how often the search terms appear
> (with more appearances giving a higher rank), where the search terms appear
> (with much higher weights attached to matches in the title, the one line
> description in the NAME section, or the SYNOPSIS section, and with somewhat
> higher weights attached to matches in the first few paragraphs of the

The current ranking scheme works on the similar lines. Different
weights have been assigned to different sections and the weights are
computed depending on in which section of the man page the match was

> Also, terms near the beginning of the search query could have a higher
> weighting, so "apropos foo bar" and "apropos bar foo" both match the same
> set of pages, but apply different weightings, causing the results to be
> sorted differently.

I am not sure this should be the default behaviour. I usually like to
express my queries in a more natural language syntax, where such
behaviour might not be very helpful. Instead as you proposed in the
earlier email, using the '+' operator to give more weightage to
particular terms in the query would be better.


Home | Main Index | Thread Index | Old Index