htdig: digging keyword lists
Mon, 15 Jun 1998 13:03:50 +0100

We are running htdig-3.0.8b2 and noticed that in keyword lists if commas
are used to separate the list then only some are searchable. This I find is
because comma is not defined as a separator in these lists (space, tab,
newline and carriage return appear to be the only valid separators). If, as
with my users, the list is separated by ", " then these keywords are
unsearchable because in the wordlist they end with a comma (htsearch
assumes a comma is a separator!). I had a look but couldn't find a patch
for this so my solution is to edit and add a comma to the
separators list in the strtok calls i.e. change :-

                char *w = strtok(keywords, " \t\r\n");
                    w = strtok(0, " \t\r\n");
                    char *w = strtok(conf["content"], " \t\r\n");
                        w = strtok(0, " \t\r\n");


                char *w = strtok(keywords, " ,\t\r\n");
                    w = strtok(0, " ,\t\r\n");
                    char *w = strtok(conf["content"], " ,\t\r\n");
                        w = strtok(0, " ,\t\r\n");

This changes it for both keywords and content.

Chris Liddiard TEL +44 171 975 5364
Systems Maintenance FAX +44 171 775 3221
Computing Services
Queen Mary & Westfield College
University of London
Mile End Road email:
London E1 4NS

To unsubscribe from the htdig mailing list, send a message to containing the single word "unsubscribe" in
the body of the message.

This archive was generated by hypermail 2.0b3 on Sat Jan 02 1999 - 16:26:33 PST