lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ehatc...@apache.org
Subject cvs commit: jakarta-lucene/src/java/org/apache/lucene/index FilterIndexReader.java SegmentTermDocs.java TermInfosReader.java
Date Mon, 14 Jun 2004 00:15:24 GMT
ehatcher    2004/06/13 17:15:24

  Modified:    src/java/org/apache/lucene/index FilterIndexReader.java
                        SegmentTermDocs.java TermInfosReader.java
  Log:
  #29548 rename enum
  
  Revision  Changes    Path
  1.12      +1 -1      jakarta-lucene/src/java/org/apache/lucene/index/FilterIndexReader.java
  
  Index: FilterIndexReader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/index/FilterIndexReader.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- FilterIndexReader.java	11 May 2004 19:28:51 -0000	1.11
  +++ FilterIndexReader.java	14 Jun 2004 00:15:24 -0000	1.12
  @@ -39,7 +39,7 @@
       public FilterTermDocs(TermDocs in) { this.in = in; }
   
       public void seek(Term term) throws IOException { in.seek(term); }
  -    public void seek(TermEnum enum) throws IOException { in.seek(enum); }
  +    public void seek(TermEnum termEnum) throws IOException { in.seek(termEnum); }
       public int doc() { return in.doc(); }
       public int freq() { return in.freq(); }
       public boolean next() throws IOException { return in.next(); }
  
  
  
  1.13      +5 -5      jakarta-lucene/src/java/org/apache/lucene/index/SegmentTermDocs.java
  
  Index: SegmentTermDocs.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/index/SegmentTermDocs.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- SegmentTermDocs.java	20 Apr 2004 13:47:58 -0000	1.12
  +++ SegmentTermDocs.java	14 Jun 2004 00:15:24 -0000	1.13
  @@ -52,14 +52,14 @@
       seek(ti);
     }
   
  -  public void seek(TermEnum enum) throws IOException {
  +  public void seek(TermEnum termEnum) throws IOException {
       TermInfo ti;
       
  -    // use comparison of fieldinfos to verify that enum belongs to the same segment as
this SegmentTermDocs
  -    if (enum instanceof SegmentTermEnum && ((SegmentTermEnum) enum).fieldInfos
== parent.fieldInfos)          // optimized case
  -      ti = ((SegmentTermEnum) enum).termInfo();
  +    // use comparison of fieldinfos to verify that termEnum belongs to the same segment
as this SegmentTermDocs
  +    if (termEnum instanceof SegmentTermEnum && ((SegmentTermEnum) termEnum).fieldInfos
== parent.fieldInfos)          // optimized case
  +      ti = ((SegmentTermEnum) termEnum).termInfo();
       else                                          // punt case
  -      ti = parent.tis.get(enum.term());
  +      ti = parent.tis.get(termEnum.term());
         
       seek(ti);
     }
  
  
  
  1.8       +5 -5      jakarta-lucene/src/java/org/apache/lucene/index/TermInfosReader.java
  
  Index: TermInfosReader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/index/TermInfosReader.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TermInfosReader.java	7 Jun 2004 16:55:52 -0000	1.7
  +++ TermInfosReader.java	14 Jun 2004 00:15:24 -0000	1.8
  @@ -60,12 +60,12 @@
     }
   
     private SegmentTermEnum getEnum() {
  -    SegmentTermEnum enum = (SegmentTermEnum)enumerators.get();
  -    if (enum == null) {
  -      enum = terms();
  -      enumerators.set(enum);
  +    SegmentTermEnum termEnum = (SegmentTermEnum)enumerators.get();
  +    if (termEnum == null) {
  +      termEnum = terms();
  +      enumerators.set(termEnum);
       }
  -    return enum;
  +    return termEnum;
     }
   
     Term[] indexTerms = null;
  
  
  

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


Mime
View raw message