Okay, I figured out how to use JAR, extracted all the files from
lucene-1.4.3.jar, added the MoreLikeThis classes in the appropriate
folder, recreated and replaced the JAR. Since Lucene is my first
exposure to Java I am pretty proud of myself at this point.

The only thing that still wasn't working was the setFieldNames function,
so I just set it to NULL in the .java code, recompiled and recreated the
.jar and now it is working! And doing a good job, too!

Thanks!

Derek



 

-----Original Message-----
From: Erik Hatcher [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 20, 2005 1:31 PM
To: java-user@lucene.apache.org
Subject: Re: Searching for similar documents

On Jul 20, 2005, at 1:47 PM, Derek Westfall wrote:
> I hope you will forgive the newbie question but do I have to add the 
> MoreLikeThis.class file to the Lucene-1.4.3.JAR for it to work?
>
> I put the .class file in my \wwwroot\web-inf\classes folder

If you put it in the right package directory under WEB-INF/classes then
it should work (provided all the dependencies it has are in WEB-
INF/lib, which may just be the Lucene JAR file).  The package is
org.apache.lucene.search.similar, so it should go in WEB-INF/classes/
org/apache/lucene/search/similar.  I recommend you put this under your
webapps WEB-INF/classes directory, not in a common directory to your
container.

>     mlt = CreateObject("java", "MoreLikeThis"); // <---- this is the 
> line that causes the error

You should use org.apache.lucene.search.similar.MoreLikeThis

     Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to