lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From o...@apache.org
Subject cvs commit: jakarta-lucene/src/java/org/apache/lucene/index SegmentsReader.java
Date Thu, 19 Sep 2002 05:31:05 GMT
otis        2002/09/18 22:31:05

  Modified:    src/java/org/apache/lucene/index SegmentsReader.java
  Log:
  - Added javadoc skeleton, nuked trailing spaces.
  
  Revision  Changes    Path
  1.6       +13 -7     jakarta-lucene/src/java/org/apache/lucene/index/SegmentsReader.java
  
  Index: SegmentsReader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/index/SegmentsReader.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- SegmentsReader.java	10 Feb 2002 22:59:12 -0000	1.5
  +++ SegmentsReader.java	19 Sep 2002 05:31:05 -0000	1.6
  @@ -60,7 +60,13 @@
   import org.apache.lucene.store.Directory;
   import org.apache.lucene.document.Document;
   
  -final class SegmentsReader extends IndexReader {
  +/**
  + * FIXME: Describe class <code>SegmentsReader</code> here.
  + *
  + * @version $Id$
  + */
  +final class SegmentsReader extends IndexReader
  +{
     protected SegmentReader[] readers;
     protected int[] starts;			  // 1st docno for each segment
     private Hashtable normsCache = new Hashtable();
  @@ -110,8 +116,8 @@
   
     private final int readerIndex(int n) {	  // find reader for doc n:
       int lo = 0;					  // search starts array
  -    int hi = readers.length - 1;		  // for first element less
  -						  // than n, return its index
  +    int hi = readers.length - 1                   // for first element less
  +
       while (hi >= lo) {
         int mid = (lo + hi) >> 1;
         int midValue = starts[mid];
  @@ -183,7 +189,7 @@
   	termEnum = (SegmentTermEnum)reader.terms(t);
         } else
   	termEnum = (SegmentTermEnum)reader.terms();
  -      
  +
         SegmentMergeInfo smi = new SegmentMergeInfo(starts[i], termEnum, reader);
         if (t == null ? smi.next() : termEnum.term() != null)
   	queue.put(smi);				  // initialize queue
  @@ -204,10 +210,10 @@
         term = null;
         return false;
       }
  -      
  +
       term = top.term;
       docFreq = 0;
  -    
  +
       while (top != null && term.compareTo(top.term) == 0) {
         queue.pop();
         docFreq += top.termEnum.docFreq();	  // increment freq
  @@ -243,7 +249,7 @@
   
     private SegmentTermDocs[] segTermDocs;
     protected SegmentTermDocs current;              // == segTermDocs[pointer]
  -  
  +
     SegmentsTermDocs(SegmentReader[] r, int[] s) {
       readers = r;
       starts = s;
  
  
  

--
To unsubscribe, e-mail:   <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>


Mime
View raw message