SOLR-2670: add NIOFSDirectoryFactory

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1149740 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2011-07-22 21:14:24 +00:00
parent 7a7ce6bc26
commit 2ff9fa27e7
3 changed files with 44 additions and 1 deletions

View File

@ -320,6 +320,8 @@ New Features
* SOLR-2584: add UniqFieldsUpdateProcessor that removes duplicate values in the * SOLR-2584: add UniqFieldsUpdateProcessor that removes duplicate values in the
specified fields. (Elmer Garduno, koji) specified fields. (Elmer Garduno, koji)
* SOLR-2670: Added NIOFSDirectoryFactory (yonik)
Optimizations Optimizations
---------------------- ----------------------

View File

@ -0,0 +1,36 @@
package org.apache.solr.core;
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.NIOFSDirectory;
import java.io.File;
import java.io.IOException;
/**
* Factory to instantiate {@link org.apache.lucene.store.NIOFSDirectory}
*
**/
public class NIOFSDirectoryFactory extends DirectoryFactory {
@Override
public Directory open(String path) throws IOException {
return new NIOFSDirectory(new File(path));
}
}

View File

@ -87,7 +87,12 @@
<!-- The DirectoryFactory to use for indexes. <!-- The DirectoryFactory to use for indexes.
solr.StandardDirectoryFactory, the default, is filesystem solr.StandardDirectoryFactory, the default, is filesystem
based. solr.RAMDirectoryFactory is memory based, not based and tries to pick the best implementation for the current
JVM and platform. One can force a particular implementation
via solr.MMapDirectoryFactory, solr.NIOFSDirectoryFactory, or
solr.SimpleFSDirectoryFactory.
solr.RAMDirectoryFactory is memory based, not
persistent, and doesn't work with replication. persistent, and doesn't work with replication.
--> -->
<directoryFactory name="DirectoryFactory" <directoryFactory name="DirectoryFactory"