mirror of https://github.com/apache/lucene.git
Disable optimized implementation with compound format.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150562 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7fec8b5ff9
commit
07c48aa589
|
@ -22,9 +22,13 @@ import org.apache.lucene.store.GCJDirectory;
|
|||
|
||||
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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue