🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #72313

Re: filtering algorithm

#72313
From: Curt Welch
Date: Sat, 24 Sep 2005 00:40
69 lines
4454 bytes
Allen Brunson <brunsona@takethisout.newsguy.com> wrote:
> hello news admins,
>
> i'm about to implement filtering rules for my client newsreader.  i want
> to give the user the ability to filter on any arbitrary header.  and i
> also want to avoid the problem that some newsreaders have, viz: they can
> only filter on what's in the overview database, but don't make it
> obvious, so the behavior is different from server to server unless they
> have identical overview fields.
>
> so i guess my first step will be to get a list of all headers that the
> current ruleset will need to filter against.  if they're all in the
> overview database, great, i can get by examining only the XOVER data.  if
> they don't, what's next?  should i either:
>
> 1) bite the bullet and do a HEAD for every single message i'm thinking
> about downloading.
>
> 2) use XPAT to get matching articles.

XPAT is not supported on all servers (same reason NEWNEWS isn't - it can
consume too many resources and tends to be abused), and on others, it only
supports the headers which are in XOVER so XPAT doesn't always help if you
are trying to search on none XOVER headers. (XPAT is just a bad design to
begin with).

> 3) use XHDR to get matching headers/articles.

Likewise, some servers only support the XOVER headers for XHDR.

> 4) something better you know about but i don't.

The reason most newsreader clients don't support anything besides XOVER
header filtering is because there is no good standard way to do it for the
other headers.  HEAD is the only thing you can expect to work everywhere
and it's just too slow for anything other than very small sets of articles.

What's very wrong to do is to automatically switch to something like using
header fetches with HEAD instead of XOVER just becase the user selected a
non-xover header from the list without any indication that doing that would
cause the search speed to drop by a factor of 1000.  When that happanes,
they ask us (instead of you) why the header search is so slow all of a
sudden.

If you can filter sets of binary posts by doing a header only on the first
article from each set, then that might be useful. But to try and do header
fetches on 100,000 headers to filter a binary group will never work.

> i guess this question is arguably off-topic here, but i'm sure you news
> admins know the answers better than anybody.  i'm still not over basing a
> whole lot of my first newsreader on the NEWNEWS command, only to discover
> that it was turned off nearly everywhere.  so this time i figure i should
> go to the source.

The answer is there really is no way to do what you want in the general
case.

The best way is to just not bother.  Do a good job of searcing and
filtering on XOVER data and don't waste your time on anything else.  If you
want to do better, run your own server to collect and index header data and
sell it as a search service instead of trying to do it over NNTP with a
newsreader.  And if you still want to do something better than XOVER, then
be ready to write a lot of very complex UI and NNTP code to make sure the
user understands what is going on, and doesn't kill servers by issuing
millions of HEAD commands or tons of XPAT commands.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                                        http://NewsReader.Com/
Technical Details
Message-ID: <20050923204014.201$oA@newsreader.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!feed4.newsreader.com!newsreader.com!newsh.newsreader.com!ellis.newsreader.com!not-for-mail
References: <PM0004016A591AD163@remy.nashville.comcast.net>

Show Full Headers
Complete Article Headers
Message-ID: <20050923204014.201$oA@newsreader.com>
Subject: Re: filtering algorithm
Date: Sat, 24 Sep 2005 00:40:14 +0000
From: curt@kcwc.com (Curt Welch)
References: <PM0004016A591AD163@remy.nashville.comcast.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!feed4.newsreader.com!newsreader.com!newsh.newsreader.com!ellis.newsreader.com!not-for-mail
Organization: NewsReader.Com
Newsgroups: news.software.nntp
X-Trace: NewsReader.Com 0VXT6krzCV@AOp3R998P+i7z/imHqc5sVItDrzSa_djqV0iJ
X-Face: "p}G*1KH{+F7EYGKLb>ogDguabZ+%,
 ?^epeFB!nzu`)`$=QcvL1KF6<0GH!Tbc!Sqo[|tV5
 %IW48mQf3K=Ci&gZ7]]aazx@]Y-nq!r5{yH/#,?@lDdUDvOfByB2hVW0.@OM%{l/{cT'{w
X-Url: http://CurtWelch.Com/
User-Agent: NewsReader.Com
Lines: 69