mirror of https://github.com/apache/lucene.git
Only mmap .frq files, to conserve address space.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150603 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
55e076372a
commit
feaea07b3c
|
@ -26,7 +26,13 @@ import java.io.File;
|
|||
public class GCJDirectory extends FSDirectory {
|
||||
|
||||
public IndexInput openInput(String name) throws IOException {
|
||||
return new GCJIndexInput(new File(getFile(), name).getPath());
|
||||
// conserve address space by only mmapping the one index file that most
|
||||
// impacts performance
|
||||
if (name.endsWith(".frq")) {
|
||||
return new GCJIndexInput(new File(getFile(), name).getPath());
|
||||
} else {
|
||||
return super.openInput(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue