[opencms-dev] Lucene problem

M Butcher mbutcher at grcomputing.net
Mon Aug 11 18:07:02 CEST 2003


The Lucene module uses the 'title' and 'description' properties of a
document using the CmsObject.readProperty(String filePath, String
propertyName) method. You can simulate that from a JSP with code like
this:

CmsJspActionElement cms = new CmsJspActionElement(pageContext, request,
response);

CmsObject cmso = cms.getCmsObject();

String myDoc = "/mydocs/TestPage.html";

out.println("Title: " + cmso.readProperty(myDoc, "title") + "<br>");
out.println("Desc: " + cmso.readProperty(myDoc, "description") +
"<br>");

If those are both null, then that is the root of the problem. If they
are both set, lemme know and I'll see if I can hunt down the source.

Oh, IRT the source code, each of the classes that implement
I_DocumentFactory does something similar to this. For example, if the
file is a Page, then PageDocument collects the info. If you notice that
the Lucene module is working for on resource type (e.g. Page) and not
another (e.g. Plain) than the likely culprit is the specific document
factory.

If you do find any bugs, please let me know. I'm incorporating some
patches and making a few changes to the code, and will release a 1.4
version when I can -- I'd like to get as much in it as I can.

Matt

On Mon, 2003-08-11 at 09:03, Ivan Jelenic wrote:
> Hi!
>  
> I am using OpenCMS on Oracle and Tomcat 4.1. I have imported lucene
> module but I have some problems. My files have titles and decription
> but lucene always show untitled and null for description. Can anybody
> help me?
-- 
M Butcher <mbutcher at grcomputing.net>



More information about the opencms-dev mailing list