Update of /cvsroot/nutch/nutch/src/java/net/nutch/db
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31442/src/java/net/nutch/db

Modified Files:
        Page.java 
Log Message:
Fix Page constructors so that next fetch date is less likely to be
misconstrued as a float.  This patches a problem in WebDBInjector,
where new pages were added to the db with nextScore set to the
intended nextFetch date.  This, in turn, confused link analysis.


Index: Page.java
===================================================================
RCS file: /cvsroot/nutch/nutch/src/java/net/nutch/db/Page.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** Page.java   7 Sep 2004 19:26:06 -0000       1.7
--- Page.java   13 Dec 2004 19:20:40 -0000      1.8
***************
*** 58,74 ****
    }
  
!   /** Construct a new, default page, due to be fetched. */
!   public Page(String urlString, float score, float nextScore, long nextFetch)
      throws MalformedURLException {
!     this(urlString, score, nextScore);
!     this.nextFetch = nextFetch;
    }
  
!   /** Construct a new, default page, due to be fetched. */
!   public Page(String urlString, float score, float nextScore) throws 
MalformedURLException {
      setURL(urlString);
      this.md5 = MD5Hash.digest(url);               // hash url, by default
      this.score = score;
      this.nextScore = nextScore;
    }
  
--- 58,78 ----
    }
  
!   public Page(String urlString, float score)
      throws MalformedURLException {
!     this(urlString, score, score, System.currentTimeMillis());
!   }
!     
!   public Page(String urlString, float score, long nextFetch)
!     throws MalformedURLException {
!     this(urlString, score, score, nextFetch);
    }
  
!   public Page(String urlString, float score, float nextScore, long nextFetch)
!     throws MalformedURLException {
      setURL(urlString);
      this.md5 = MD5Hash.digest(url);               // hash url, by default
      this.score = score;
      this.nextScore = nextScore;
+     this.nextFetch = nextFetch;
    }
  



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
Nutch-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nutch-cvs

Reply via email to