Aaron Turner (firstname.lastname@example.org)
Sun, 20 Jun 1999 13:33:43 -0700 (PDT)
Geoff suggested I take this to the dev list, so here it goes.
A little history:
I'm building a site which stores content in a SQL db which is accessed via
PHP. Content is in the form of 'articles' which are categorized in a
tree structure. Each article can live in one or more branches.
URL's are in the format of:
Where x is the unique article ID, and a is the top of the tree. b is a
subcat of a, c is a subcat of b, etc. so:
In these cases, #1 and #2 are pointing to the same article, but in
different locations in the tree. #1 and #3 are in the same subcat, but
are different articles.
One of the main features of the site is allowing drill-downs. Ie.
Selecting a category/sub-cat, and doing a search from there to limit your
So, If a user does a search from category 1.3.5 on a word that matches
against article 127 he'll get one match. If he does the search from cat
1.3 however he will get two hits- for the same article (127). This is
what I'm trying to prevent. Basically, I need htsearch to scan the URL's
of all matches, select the value of 'id' and compare each hit to the
others and drop duplicates.
I was told the way to do this was by modifing Display::buildMatchList() in
htsearch/Display.cc to weed out the duplicates before they're counted and
paginated. (Doing this post htsearch via a wrapper causes incorrect
Honestly, I'm pretty SOL at this point. I barely can do 'hello world' in
C++, and a friend of mine who knows C/C++ took a quick look at the code
quickly gave up because it wasn't intuitive in his opinion.
I was hoping someone could give me some pointers that I could either
forward to my friend so that he could do it, or so that when I pick up one
of the 5 or so C++ books I have laying around I can figure it out myself.
(I've done a lot of Pascal/Perl programming in the past, so I know how to
program, just not C++ or much OOP.)
Of course if someone is bored and looking for something to do, I'd be more
than happy to explain this more so they could do it for me. :-)
To unsubscribe from the htdig3-dev mailing list, send a message to
email@example.com containing the single word "unsubscribe" in
the SUBJECT of the message.
This archive was generated by hypermail 2.0b3 on Sun Jun 20 1999 - 12:49:16 PDT