Gilles Detillieux (email@example.com)
Fri, 29 Jan 1999 12:12:57 -0600 (CST)
According to Geoff Hutchison:
> OK, I promised a patch for the valid_punctuation problem. Here's a patch
> that adds the original user input, with punctuation, to the StringMatch
> used for excerpts.
> However, I just noticed excerpt hilighting seems broken on my system. So I
> can't test it out. :-( I did put in debugging output, so I know it's
> setting the StringMatch correctly.
> If someone could test this, I'd appreciate it. If someone can figure out
> why my excerpt hilighting isn't working, I'd be very, very happy.
It's working fine on my system, with the new databases. Your patch seems
to work fine as well. I've made a couple small changes, in the patch
below. When I saw the IgnoreCase() after Pattern(), instead of before,
it just looked wrong to me, because everywhere else it's the other way
around. Oddly enough, it seems to work either way, even though Pattern()
does make use of the existing trans table. In the process of poking
around in IgnoreCase(), I think I uncovered a memory leak. It's probably
small and inconsequential, but it seems IgnoreCase() should do this:
delete  trans;
before allocating a new table. The other change in my patch is to move the
pos--; back to where it was, just after the loop that overincremented it.
--- htsearch/htsearch.cc.geoff Fri Jan 29 10:01:00 1999
+++ htsearch/htsearch.cc Fri Jan 29 10:29:10 1999
@@ -280,8 +280,8 @@
// Assemble the full pattern for excerpt matching and highlighting
origPattern += logicalPattern;
cout << "Excerpt pattern: " << origPattern << "\n";
@@ -466,6 +466,7 @@
word << (char) t;
t = *pos++;
if (boolean && mystrcasecmp(word.get(), "and") == 0)
tempWords.Add(new WeightWord("&", -1.0));
@@ -495,7 +496,6 @@
-- Gilles R. Detillieux E-mail: <firstname.lastname@example.org> Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/~grdetil Dept. Physiology, U. of Manitoba Phone: (204)789-3766 Winnipeg, MB R3E 3J7 (Canada) Fax: (204)789-3930 ------------------------------------ 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 Thu Feb 04 1999 - 22:24:21 PST