Help save net neutrality! Learn more.
Close

#181 htsearch counts matches in invalid URLs

Include_in_3.2
closed
htsearch (60)
3
2003-10-22
2003-10-14
No

If remove_bad_urls is false, the database can contain
invalid URLs.
In CVS at 2003-10-14 on Mandrake Linux, htsearch
(correctly) suppresses matches for the names of these
URLs, but (incorrectly) counts them in the total number
of matches. This results in, for example, a page
saying "1-2 of 2 matches" but containing only one match.

For example, search for "technical" in the test suite
with remove_bad_urls=false.

Discussion

  • Neal Richter

    Neal Richter - 2003-10-14
    • milestone: --> Include_in_3.2
    • assigned_to: nobody --> nealr
     
  • Neal Richter

    Neal Richter - 2003-10-14

    Logged In: YES
    user_id=624975

    I found this bug when converting code to libhtdig.. Its an easy fix.
    I'll commit the fix and have you test it.

     
  • Neal Richter

    Neal Richter - 2003-10-21

    Logged In: YES
    user_id=624975

    Lachlan:

    Please try this patch in parser.cc

    863,864d863
    < DocumentRef *ref = NULL;
    <
    888,891d886
    <
    < ref = collection->getDocumentRef(dm->GetId());
    < if(ref->DocState() == Reference_normal)
    < {
    896d890
    < }

    Thanks.

     
  • Lachlan Andrew

    Lachlan Andrew - 2003-10-22

    Logged In: YES
    user_id=663373

    I've applied, tested and committed the patch. Please close
    the bug report once you have confirmed the patch was applied
    correctly. Thanks :)

     
  • Neal Richter

    Neal Richter - 2003-10-22

    Logged In: YES
    user_id=624975

    Looks great. Thanks. Neal

     
  • Neal Richter

    Neal Richter - 2003-10-22
    • status: open --> closed
     

Log in to post a comment.