From feaea07b3c4e17d1050bc530980c4f3c3405f8fb Mon Sep 17 00:00:00 2001 From: Doug Cutting Date: Wed, 13 Oct 2004 17:19:58 +0000 Subject: [PATCH] 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 --- src/gcj/org/apache/lucene/store/GCJDirectory.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gcj/org/apache/lucene/store/GCJDirectory.java b/src/gcj/org/apache/lucene/store/GCJDirectory.java index 305e76082f1..eb133f1fa58 100644 --- a/src/gcj/org/apache/lucene/store/GCJDirectory.java +++ b/src/gcj/org/apache/lucene/store/GCJDirectory.java @@ -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); + } } }