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:
Doug Cutting 2004-10-13 17:19:58 +00:00
parent 55e076372a
commit feaea07b3c
1 changed files with 7 additions and 1 deletions

View File

@ -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);
}
}
}