Greetings,

No, but it is attached.

Cheers,
Lachlan

On Wed, 11 Dec 2002 02:30, Budd, Sinclair wrote:
> Did this patch make it into a snapshot?

> -----Original Message-----
> From: Geoff Hutchison [mailto:[EMAIL PROTECTED]]
> On Monday, December 2, 2002, at 07:52  PM, Lachlan Andrew 
wrote:
> >  The backward-compatible fix is to fix  htsearch  (a
> > five line patch)

-- 
Lachlan Andrew  Phone: +613 8344-3816 Fax: +613 8344-6678
Dept of Electrical and Electronic Engg          CRICOS Provider Code
University of Melbourne, Victoria, 3010  AUSTRALIA      00116K
*** htdig-cvs/htsearch/parser.cc	Sat Feb  2 09:49:35 2002
--- parser.cc	Wed Dec 11 11:09:58 2002
***************
*** 300,305 ****
--- 300,308 ----
  }
  
  //*****************************************************************************
+ // BUG:  Phrases containing "bad words" can have *any* "bad word" in that
+ //       position.  Words less than  minimum_word_length  ignored entirely,
+ //       as they are not indexed.
  void
  Parser::perform_phrase(List * &oldWords)
  {
***************
*** 310,315 ****
--- 313,321 ----
      List	*newWords = 0;
      HtWordReference *oldWord, *newWord;
  
+     // how many words ignored since last checked word?
+     static int	ignoredWords;
+ 
      // if the query is empty, no further effort is needed
      if(oldWords && oldWords->Count() == 0)
      {
***************
*** 323,328 ****
--- 329,336 ----
  	//
  	// This word needs to be ignored.  Make it so.
  	//
+ 	if (temp.length() >= config->Value ("minimum_word_length"))
+ 	    ignoredWords++;
  	if(debug) cerr << "ignoring: " << temp << endl;
  	return;
      }
***************
*** 381,387 ****
  	oid << did;
  	oid << "-";
  	int loc = oldWord->Location();
! 	oid << loc+1;
  	if (newDict.Exists(oid))
  	  {
  	    newWord = (HtWordReference *)newDict.Find(oid);
--- 389,395 ----
  	oid << did;
  	oid << "-";
  	int loc = oldWord->Location();
! 	oid << loc + ignoredWords+1;
  	if (newDict.Exists(oid))
  	  {
  	    newWord = (HtWordReference *)newDict.Find(oid);
***************
*** 394,399 ****
--- 402,408 ----
  	    results->Add(result);
  	  }
        }
+     ignoredWords = 0;	// most recent word is not a non-ignored word
  
      newDict.Release();
  

Reply via email to