Skip to content

Commit

Permalink
make dim files mmapped (#49272)
Browse files Browse the repository at this point in the history
This change mmaps dim files in HybridDirectory to take advantage of off-
heap BKD trees. This is based off of (#48509) via 
(https://issues.apache.org/jira/browse/LUCENE-8932).
  • Loading branch information
jdconrad committed Nov 19, 2019
1 parent 2f5acae commit 14d2e79
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ boolean useDelegate(String name) {
case "tim":
case "tip":
case "cfs":
case "dim":
return true;
default:
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public void testPreload() throws IOException {
assertTrue(hybridDirectory.useDelegate("foo.tim"));
assertTrue(hybridDirectory.useDelegate("foo.tip"));
assertTrue(hybridDirectory.useDelegate("foo.cfs"));
assertTrue(hybridDirectory.useDelegate("foo.dim"));
assertFalse(hybridDirectory.useDelegate("foo.bar"));
MMapDirectory delegate = hybridDirectory.getDelegate();
assertThat(delegate, Matchers.instanceOf(FsDirectoryFactory.PreLoadMMapDirectory.class));
Expand Down

0 comments on commit 14d2e79

Please sign in to comment.