On Wed, 14 Apr 2004, Douglas Kline wrote: > A scan of the source code in the htdig and htsearch directories confirms that > the string "search_algorithm" is found only in the latter directory (and there > only in the file htsearch.cc and in that file in only one command line). That > doesn't prove that the htdig command isn't affected by the definition of that > attribute.
Actually I think it does ;) If htdig doesn't know about it, it isn't going to do anything special because of it. In any case there are very few people who know the code base even half as well as Gilles, so unless you have some really strong evidence to the contrary, I would accept his opinion on this one. > A repetition of the tests I ran before confirms that a database created by > "rundig -a" with an htdig.conf file with the line > > search_algorithm: substring:0.5 > > can be searched for strings other than whole words by htsearch using the same That is because *htsearch* is now using the htdig.conf *with* substring:0.5. > htdig.conf file while a database created by "rundig -a" with an htdig.conf file > with the line > > search_algorithm: exact:1 synonyms:0.5 endings:0.1 > > cannot be searched for such strings. The files in the database created by That is because *htsearch* is now using a configuration file *without* a substring setting. For substrings, it is all about the settings in the configuration file used by htsearch. It doesn't have anything to do with what is in the configuration file used by htdig (or any of the other programs). > rundig with these two htdig.conf files are the same size. However I ran cksum > on them and got different results. So their content is different. As it should be. There will be fields that change from one dig to the next (e.g. timestamps). > rundig calls htdig, htpurge, htnotify, and htfuzzy. Might one of the others be > relevant? htnotify does not affect the database. If I understand correctly, > htfuzzy doesn't either and when I ran it the files in the database weren't > changed. Not for substring, though there are dependencies on htfuzzy for a number of the other algorithms. However I believe everything generated by htfuzzy lives in separate databases generated by htfuzzy. > In trying to pin down whether htdig or htpurge or both had to be run with the > htdig.conf file with the search_algorithm: line, I found that specifying the > alternate htdig.conf file with "-c <file name>" didn't have the same effect as > naming the alternate htdig.conf file "htdig.conf", i.e. > > bin/ rundig -a -c conf/htdig-substring.conf > > while conf/htdig.conf is a different file from conf/htdig-substring.conf > produces a database which cannot be searched for non-word strings and > > ln conf/htdig-substring.conf conf/htdig.conf > > followed by > > bin/rundig -a > > does. What's going on here? Is the "-c" flag not being interpreted correctly? It is hard to say what exactly is going on here because the important bit is which configuration file you used with htsearch, not rundig. My guess is that in both cases htsearch was using htdig.conf. In the first case the htdig.conf file contained the stock search_algorithm line and therefore substring searching was disabled. In the second case, htdig.conf was then pointing to htdig-substring.conf, which did have the substring algorithm specified and thus htsearch was able to perform substring searches. It is a safe bet that there is nothing fundamentally wrong with the -c option. There are a lot of us who use it on a regular basis with no problem whatsoever. Jim ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ ht://Dig general mailing list: <[EMAIL PROTECTED]> ht://Dig FAQ: http://htdig.sourceforge.net/FAQ.html List information (subscribe/unsubscribe, etc.) https://lists.sourceforge.net/lists/listinfo/htdig-general