You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by yo...@apache.org on 2011/07/22 23:14:25 UTC
svn commit: r1149740 - in /lucene/dev/trunk/solr: CHANGES.txt
core/src/java/org/apache/solr/core/NIOFSDirectoryFactory.java
example/solr/conf/solrconfig.xml
Author: yonik
Date: Fri Jul 22 21:14:24 2011
New Revision: 1149740
URL: http://svn.apache.org/viewvc?rev=1149740&view=rev
Log:
SOLR-2670: add NIOFSDirectoryFactory
Added:
lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/NIOFSDirectoryFactory.java (with props)
Modified:
lucene/dev/trunk/solr/CHANGES.txt
lucene/dev/trunk/solr/example/solr/conf/solrconfig.xml
Modified: lucene/dev/trunk/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/CHANGES.txt?rev=1149740&r1=1149739&r2=1149740&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Fri Jul 22 21:14:24 2011
@@ -320,6 +320,8 @@ New Features
* SOLR-2584: add UniqFieldsUpdateProcessor that removes duplicate values in the
specified fields. (Elmer Garduno, koji)
+* SOLR-2670: Added NIOFSDirectoryFactory (yonik)
+
Optimizations
----------------------
Added: lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/NIOFSDirectoryFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/NIOFSDirectoryFactory.java?rev=1149740&view=auto
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/NIOFSDirectoryFactory.java (added)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/NIOFSDirectoryFactory.java Fri Jul 22 21:14:24 2011
@@ -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));
+ }
+}
Modified: lucene/dev/trunk/solr/example/solr/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/example/solr/conf/solrconfig.xml?rev=1149740&r1=1149739&r2=1149740&view=diff
==============================================================================
--- lucene/dev/trunk/solr/example/solr/conf/solrconfig.xml (original)
+++ lucene/dev/trunk/solr/example/solr/conf/solrconfig.xml Fri Jul 22 21:14:24 2011
@@ -87,7 +87,12 @@
<!-- The DirectoryFactory to use for indexes.
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.
-->
<directoryFactory name="DirectoryFactory"