lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject cvs commit: jakarta-lucene/src/gcj/org/apache/lucene/index GCJSegmentReader.java
Date Wed, 13 Oct 2004 17:24:02 GMT
cutting     2004/10/13 10:24:02

  Modified:    src/gcj/org/apache/lucene/index GCJSegmentReader.java
  Log:
  Check the type of the IndexInput rather than the Directory to detect
  native implementation.  This is a simpler and more correct test.  It
  also permits the Directory to return a mixture of native and
  non-native IndexInput implementations.
  
  Revision  Changes    Path
  1.3       +2 -3      jakarta-lucene/src/gcj/org/apache/lucene/index/GCJSegmentReader.java
  
  Index: GCJSegmentReader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/gcj/org/apache/lucene/index/GCJSegmentReader.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- GCJSegmentReader.java	4 Oct 2004 19:05:05 -0000	1.2
  +++ GCJSegmentReader.java	13 Oct 2004 17:23:26 -0000	1.3
  @@ -18,7 +18,7 @@
   
   import java.io.IOException;
   
  -import org.apache.lucene.store.GCJDirectory;
  +import org.apache.lucene.store.GCJIndexInput;
   
   class GCJSegmentReader extends SegmentReader {
   
  @@ -26,8 +26,7 @@
      * implementation can only be used when the segment's directory is a
      * GCJDirectory and it is not in compound format.  */
     public final TermDocs termDocs() throws IOException {
  -    if (directory() instanceof GCJDirectory       // it's a GCJ directory
  -        && this.cfsReader == null) {              // & not in compound format
  +    if (freqStream instanceof GCJIndexInput) {    // it's a GCJIndexInput
         return new GCJTermDocs(this);               // so can use GCJTermDocs
       } else {
         return super.termDocs();
  
  
  

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