lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gol...@apache.org
Subject cvs commit: jakarta-lucene/src/java/org/apache/lucene/index MultiReader.java FilterIndexReader.java IndexReader.java SegmentReader.java
Date Wed, 06 Oct 2004 09:05:56 GMT
goller      2004/10/06 02:05:56

  Modified:    src/java/org/apache/lucene/index MultiReader.java
                        FilterIndexReader.java IndexReader.java
                        SegmentReader.java
  Log:
  Remove some deprecated warnings from core.
  
  Revision  Changes    Path
  1.10      +1 -12     jakarta-lucene/src/java/org/apache/lucene/index/MultiReader.java
  
  Index: MultiReader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/index/MultiReader.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- MultiReader.java	5 Oct 2004 17:30:47 -0000	1.9
  +++ MultiReader.java	6 Oct 2004 09:05:56 -0000	1.10
  @@ -235,17 +235,6 @@
       return fieldSet;
     }
   
  -  public Collection getIndexedFieldNames(boolean storedTermVector) {
  -    // maintain a unique set of field names
  -    Set fieldSet = new HashSet();
  -    for (int i = 0; i < subReaders.length; i++) {
  -      IndexReader reader = subReaders[i];
  -      Collection names = reader.getIndexedFieldNames(storedTermVector);
  -      fieldSet.addAll(names);
  -    }
  -    return fieldSet;
  -  }
  -
     public Collection getIndexedFieldNames (Field.TermVector tvSpec){
       // maintain a unique set of field names
       Set fieldSet = new HashSet();
  
  
  
  1.14      +0 -10     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.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- FilterIndexReader.java	5 Oct 2004 17:30:47 -0000	1.13
  +++ FilterIndexReader.java	6 Oct 2004 09:05:56 -0000	1.14
  @@ -138,16 +138,6 @@
       return in.getFieldNames(indexed);
     }
   
  -  /**
  -   * 
  -   * @param storedTermVector if true, returns only Indexed fields that have term vector
info, 
  -   *                        else only indexed fields without term vector info 
  -   * @return Collection of Strings indicating the names of the fields
  -   */
  -  public Collection getIndexedFieldNames(boolean storedTermVector) {
  -    return in.getIndexedFieldNames(storedTermVector);
  -  }
  -
     public Collection getIndexedFieldNames (Field.TermVector tvSpec){
       return in.getIndexedFieldNames(tvSpec);
     }
  
  
  
  1.38      +15 -2     jakarta-lucene/src/java/org/apache/lucene/index/IndexReader.java
  
  Index: IndexReader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/index/IndexReader.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- IndexReader.java	5 Oct 2004 17:30:47 -0000	1.37
  +++ IndexReader.java	6 Oct 2004 09:05:56 -0000	1.38
  @@ -26,6 +26,8 @@
   import java.io.File;
   import java.io.IOException;
   import java.util.Collection;
  +import java.util.HashSet;
  +import java.util.Set;
   
   /** IndexReader is an abstract class, providing an interface for accessing an
    index.  Search of an index is done entirely through this abstract interface,
  @@ -564,7 +566,18 @@
      * 
      * @deprecated  Replaced by {@link #getIndexedFieldNames (Field.TermVector tvSpec)}
      */ 
  -  public abstract Collection getIndexedFieldNames(boolean storedTermVector);
  +  public Collection getIndexedFieldNames(boolean storedTermVector){
  +    if(storedTermVector){
  +      Set fieldSet = new HashSet();
  +      fieldSet.addAll(getIndexedFieldNames(Field.TermVector.YES));
  +      fieldSet.addAll(getIndexedFieldNames(Field.TermVector.WITH_POSITIONS));
  +      fieldSet.addAll(getIndexedFieldNames(Field.TermVector.WITH_OFFSETS));
  +      fieldSet.addAll(getIndexedFieldNames(Field.TermVector.WITH_POSITIONS_OFFSETS));
  +      return fieldSet;
  +    }
  +    else
  +      return getIndexedFieldNames(Field.TermVector.NO);
  +  }
     
     /**
      * Get a list of unique field names that exist in this index, are indexed, and have
  
  
  
  1.31      +1 -20     jakarta-lucene/src/java/org/apache/lucene/index/SegmentReader.java
  
  Index: SegmentReader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/index/SegmentReader.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- SegmentReader.java	5 Oct 2004 17:30:47 -0000	1.30
  +++ SegmentReader.java	6 Oct 2004 09:05:56 -0000	1.31
  @@ -337,25 +337,6 @@
       }
       return fieldSet;
     }
  -
  -  /**
  -   * 
  -   * @param storedTermVector if true, returns only Indexed fields that have term vector
info, 
  -   *                        else only indexed fields without term vector info 
  -   * @return Collection of Strings indicating the names of the fields
  -   */
  -  public Collection getIndexedFieldNames(boolean storedTermVector) {
  -    if(storedTermVector){
  -      Set fieldSet = new HashSet();
  -      fieldSet.addAll(getIndexedFieldNames(Field.TermVector.YES));
  -      fieldSet.addAll(getIndexedFieldNames(Field.TermVector.WITH_POSITIONS));
  -      fieldSet.addAll(getIndexedFieldNames(Field.TermVector.WITH_OFFSETS));
  -      fieldSet.addAll(getIndexedFieldNames(Field.TermVector.WITH_POSITIONS_OFFSETS));
  -      return fieldSet;
  -    }
  -    else
  -      return getIndexedFieldNames(Field.TermVector.NO);
  -  }
     
     public Collection getIndexedFieldNames (Field.TermVector tvSpec){
       boolean storedTermVector;
  
  
  

---------------------------------------------------------------------
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