This is the historical archive of the now-inactive 'grubstreet' list.
Discussion on OpenGuides development has now moved to OpenGuides-Dev. Discussion on The Open Guide to London now takes place on OpenGuides-London.

[grubstreet] FW: /var/log/apache/grault.net-error.log

[prev] [thread] [next] [lurker] [Date index for 2002/12/17]

From: Ivor Williams
Subject: [grubstreet] FW: /var/log/apache/grault.net-error.log
Date: 10:39 on 17 Dec 2002
On Monday, December 16, 2002 6:50 PM, Earle Martin [SMTP:earle@xxxxxxxx.xxx] 
wrote:
> Also, I was wondering, how are the search results ordered?
>
The search results are sorted on the number of matches. For example, doing a 
search on"pub" finds 93 pages on GS at the moment. The top page is "Category 
Pubs", which has 13 occurrences of the word "pub" - not including the word 
"pubs" which don't count as matches.

Only the first 6 matches are displayed, but the result is sorted as if it were 
displaying all 13.

When you introduce '&' and '|' it gets a bit more complicated. In both cases, 
the number of matches is summed from the component submatches, regardless of 
whether we are 'and'ing or 'or'ing. A search for "pub&ale" still gives 
"Category Pubs" as top result. There are 2 occurrences of the word 'ale' on the 
page giving a total of 15 matched words.

The component submatches are interspersed, and the rendering only dsplays the 
first 6 matches. Thus, in this case, we get ('pub', 'ale', 'pub', 'ale', 'pub', 
'pub').

The number 6 is arbitrary and hardcoded - I could easily tweak this or make it 
into a parameter if needed. The same is true of the number of results to 
display at a time (currently 20).

Hope this helps,

Ivor.


-- 
grubstreet mailing list
http://london.openguides.org/old-list-archives/