You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2016/07/15 15:31:14 UTC

svn commit: r1752842 - in /ofbiz/trunk/specialpurpose/lucene: config/lucene.properties config/search.properties src/main/java/org/ofbiz/content/search/SearchWorker.java

Author: jleroux
Date: Fri Jul 15 15:31:14 2016
New Revision: 1752842

URL: http://svn.apache.org/viewvc?rev=1752842&view=rev
Log:
A patch from Pierre Smits for "Rename search.properties in special purpose/lucene to lucene.properties" https://issues.apache.org/jira/browse/OFBIZ-6224

Currently many properties files in various components are named after the component, i.e. the bi component has bi.properties.
In order to have consistency from component to component the search.properties file in the special purpose/lucene component must be renamed to lucene.properties and all references in components should reflect the change.

jleroux: I had to handle the src path change

Added:
    ofbiz/trunk/specialpurpose/lucene/config/lucene.properties   (with props)
Removed:
    ofbiz/trunk/specialpurpose/lucene/config/search.properties
Modified:
    ofbiz/trunk/specialpurpose/lucene/src/main/java/org/ofbiz/content/search/SearchWorker.java

Added: ofbiz/trunk/specialpurpose/lucene/config/lucene.properties
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/lucene/config/lucene.properties?rev=1752842&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/lucene/config/lucene.properties (added)
+++ ofbiz/trunk/specialpurpose/lucene/config/lucene.properties Fri Jul 15 15:31:14 2016
@@ -0,0 +1,20 @@
+###############################################################################
+# 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.
+###############################################################################
+
+defaultIndex=runtime/indexes

Propchange: ofbiz/trunk/specialpurpose/lucene/config/lucene.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/lucene/config/lucene.properties
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/specialpurpose/lucene/config/lucene.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ofbiz/trunk/specialpurpose/lucene/src/main/java/org/ofbiz/content/search/SearchWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/lucene/src/main/java/org/ofbiz/content/search/SearchWorker.java?rev=1752842&r1=1752841&r2=1752842&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/lucene/src/main/java/org/ofbiz/content/search/SearchWorker.java (original)
+++ ofbiz/trunk/specialpurpose/lucene/src/main/java/org/ofbiz/content/search/SearchWorker.java Fri Jul 15 15:31:14 2016
@@ -18,10 +18,10 @@
  *******************************************************************************/
 package org.ofbiz.content.search;
 
-import java.lang.String;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.lucene.util.Version;
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.UtilDateTime;
 import org.ofbiz.base.util.UtilMisc;
@@ -33,7 +33,6 @@ import org.ofbiz.entity.GenericEntityExc
 import org.ofbiz.entity.GenericValue;
 import org.ofbiz.entity.util.EntityQuery;
 import org.ofbiz.service.LocalDispatcher;
-import org.apache.lucene.util.Version;
 
 /**
  * SearchWorker Class
@@ -68,7 +67,7 @@ public final class SearchWorker {
     }
 
     public static String getIndexPath(String path) {
-        String basePath = UtilProperties.getPropertyValue("search", "defaultIndex", "index");
+        String basePath = UtilProperties.getPropertyValue("lucene", "defaultIndex", "index");
         return (UtilValidate.isNotEmpty(path)? basePath + "/" + path: basePath);
     }