Author: dbera Date: Sun Feb 17 00:38:46 2008 New Revision: 4494 URL: http://svn.gnome.org/viewvc/beagle?rev=4494&view=rev
Log: TermEnum is already positioned at the first term when created. No need to call Next() before accessing first term. Modified: branches/beagle-rdf/beagled/LuceneCommon.cs Modified: branches/beagle-rdf/beagled/LuceneCommon.cs ============================================================================== --- branches/beagle-rdf/beagled/LuceneCommon.cs (original) +++ branches/beagle-rdf/beagled/LuceneCommon.cs Sun Feb 17 00:38:46 2008 @@ -337,8 +337,11 @@ // http://mail-archives.apache.org/mod_mbox/lucene-java-user/200504.mbox/[EMAIL PROTECTED] enumerator = reader.Terms (); - while (enumerator.Next ()) { + do { Term term = enumerator.Term (); + if (term == null) + break; + positions = reader.TermPositions (term); while (positions.Next ()) { @@ -349,7 +352,7 @@ } positions.Close (); positions = null; - } + } while (enumerator.Next ()); enumerator.Close (); enumerator = null; _______________________________________________ SVN-commits-list mailing list (read only) http://mail.gnome.org/mailman/listinfo/svn-commits-list Want to limit the commits to a few modules? Go to above URL, log in to edit your options and select the modules ('topics') you want. Module maintainer? It is possible to set the reply-to to your development mailing list. Email [EMAIL PROTECTED] if interested.