View Javadoc

1   /*
2    * MMBase Lucene module
3    *
4    * The contents of this file are subject to the Mozilla Public License
5    * Version 1.0 (the "License"); you may not use this file except in
6    * compliance with the License. You may obtain a copy of the License at
7    * http://www.mozilla.org/MPL/
8    *
9    * Software distributed under the License is distributed on an "AS IS"
10   * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
11   * License for the specific language governing rights and limitations
12   * under the License.
13   */
14  package net.sf.mmapps.modules.lucenesearch;
15  
16  import net.sf.mmapps.modules.cloudprovider.CloudProviderFactory;
17  
18  import org.mmbase.bridge.Cloud;
19  
20  /***
21   * Test class
22   * @author Wouter Heijke
23   * @version $Revision: 1.2 $
24   */
25  public class MMIndex {
26      
27      public static void main(String[] args) {
28          mmtest();
29      }
30  
31      private static void mmtest() {
32          String configFile = "lucenemodule.xml";
33          System.setProperty("mmbase.defaultcloudcontext","rmi://192.168.1.114:4022/remotecontext");
34          Cloud mmbase =CloudProviderFactory.getCloudProvider().getCloud();
35  
36          LuceneManager config = new LuceneManager();
37          config.readConfig(configFile);
38          config.collectAll(mmbase);
39  
40          System.out.println("done");
41      }
42  }