lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From superruiye <superru...@gmail.com>
Subject Re: Why read past EOF
Date Fri, 03 Feb 2012 03:17:35 GMT
eg,I implement IndexDeletionPolicy and the onCommit():

	public void onCommit(List<? extends IndexCommit> commits) {
		// Note that commits.size() should normally be 2 (if not
		// called by onInit above):
		int size = commits.size();
		long present = System.currentTimeMillis();
		for (int i = 0; i < size - 1; i++) {
			if (present - commits.get(i).getVersion() > deletionPostPone){ 
//deletionPostPone=600000
				commits.get(i).delete();
			}
		}
	}

--
View this message in context: http://lucene.472066.n3.nabble.com/Why-read-past-EOF-tp3639401p3712006.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message