[opencms-dev] Lucene with Mutliple Projects
Ernesto De Santis
ernesto.desantis at colaborativa.net
Wed Feb 11 20:32:01 CET 2004
Hi Ben and Matt
I look the SearchParameters code from the opencms-lucene module.
Remember the problem, the task line:
>30 06 * * * Admin Administrators
>net.grcomputing.opencms.search.lucene.CronIndexManager
>createIndex=true,registry=config/registry2.xml
don´t work.
the constructor is:
public SearchParameters(String registryPath) throws CmsException {
I_CmsRegistry reg = new CmsRegistry(registryPath);
Element ele_sys = reg.getSystemElement();
ele_luceneSearch = getLuceneSearchElement(ele_sys);
if (ele_luceneSearch == null)
throw new CmsException("No Lucene search config found in registry");
readConfig();
return;
}
I think that the String parameter for the CmsRegistry constructor, may be:
I_CmsRegistry reg = new CmsRegistry(CmsBase.getAbsolutePath(registryPath));
Or
Check if the registryPath is a relative or absolute path, and after call the
constructor with the correct parameter.
I prove this in my code, and work fine.
Ernesto.
----- Original Message -----
From: "Ben Rometsch" <ben at solidstategroup.com>
To: <opencms-dev at opencms.org>
Sent: Wednesday, February 04, 2004 1:19 PM
Subject: Re: [opencms-dev] Lucene with Mutliple Projects
Hi Ernesto,
I am getting the following error:
java.io.FileNotFoundException: config/registry2.xml (No such file or
directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at com.opencms.file.CmsRegistry.<init>(CmsRegistry.java:180)
at
net.grcomputing.opencms.search.lucene.SearchParameters.<init>(SearchParamete
rs.java:101)
at
net.grcomputing.opencms.search.lucene.IndexManager.<init>(IndexManager.java:
103)
at
net.grcomputing.opencms.search.lucene.CronIndexManager.launch(CronIndexManag
er.java:103)
at
com.opencms.core.CmsCronScheduleJob.run(CmsCronScheduleJob.java:68)
The file registry2.xml is present in the <webapp>/WEB-INF/config
directory. Any ideas?
Ben
Ernesto De Santis wrote:
>Ben
>
>We have two indexes in one project.
>
>You can build a second "registry.xml", for example registry2.xml and
>configure the second luceneSearch in this file. With another Analyzer
>(if you want) and in another folder (indexDir).
>
>When you configure the task, you can use a parameter specifying which
>.xml to use.
>For example:
>
>30 06 * * * Admin Administrators
>net.grcomputing.opencms.search.lucene.CronIndexManager
>createIndex=true,registry=config/registry2.xml
>
>Note the registry parameter.
>
>There are problems with spaces in the task line, don´t use spaces! only
>if necessary.
>
>After that, you should use one IndexSearcher per index.
>
>Ernesto.
>
>----- Original Message -----
>From: "Ben Rometsch" <ben at solidstategroup.com>
>To: <opencms-dev at opencms.org>
>Sent: Tuesday, February 03, 2004 2:41 PM
>Subject: [opencms-dev] Lucene with Mutliple Projects
>
>
>
>
>>Hi There,
>>
>>I have successfully integrated the lucene module into my project, but I
>>need to implement a seperate index for a second project that I have in
>>my opencms application. Is this possible? I tried just copying the entire:
>>
>><luceneSearch>
>>...
>></luceneSearch>
>>
>>in the registry.xml file and setting up different VFS directories and a
>>different index directory in the actual file system, but that does not
>>appear to be working - nothing is being created in the second index
>>directory.
>>
>>Any ideas?
>>Thanks,
>>Ben
>>
>>--
>>----== Solid State Group ==----
>>Web www.solidstategroup.com
>>Email ben at solidstategroup.com
>>MSN benrometsch at hotmail.com
>>
>>_______________________________________________
>>This mail is send to you from the opencms-dev mailing list
>>To change your list options, or to unsubscribe from the list, please visit
>>http://mail.opencms.org/mailman/listinfo/opencms-dev
>>
>>
>>
>>
>
>_______________________________________________
>This mail is send to you from the opencms-dev mailing list
>To change your list options, or to unsubscribe from the list, please visit
>http://mail.opencms.org/mailman/listinfo/opencms-dev
>
>
>
>
--
----== Solid State Group ==----
Web www.solidstategroup.com
Email ben at solidstategroup.com
MSN benrometsch at hotmail.com
_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms.org/mailman/listinfo/opencms-dev
More information about the opencms-dev
mailing list