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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to