You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by cu...@apache.org on 2004/10/04 21:05:06 UTC

cvs commit: jakarta-lucene/src/gcj/org/apache/lucene/index GCJSegmentReader.java

cutting     2004/10/04 12:05:05

  Modified:    src/gcj/org/apache/lucene/index GCJSegmentReader.java
  Log:
  Disable optimized implementation with compound format.
  
  Revision  Changes    Path
  1.2       +6 -2      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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- GCJSegmentReader.java	22 Sep 2004 18:32:26 -0000	1.1
  +++ GCJSegmentReader.java	4 Oct 2004 19:05:05 -0000	1.2
  @@ -22,9 +22,13 @@
   
   class GCJSegmentReader extends SegmentReader {
   
  +  /** Try to use an optimized native implementation of TermDocs.  The optimized
  +   * 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) {
  -      return new GCJTermDocs(this);
  +    if (directory() instanceof GCJDirectory       // it's a GCJ directory
  +        && this.cfsReader == null) {              // & not in compound format
  +      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