Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 40725 invoked from network); 20 Jul 2005 17:47:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Jul 2005 17:47:46 -0000 Received: (qmail 85639 invoked by uid 500); 20 Jul 2005 17:47:39 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 85619 invoked by uid 500); 20 Jul 2005 17:47:39 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 85606 invoked by uid 99); 20 Jul 2005 17:47:39 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Jul 2005 10:47:39 -0700 X-ASF-Spam-Status: No, hits=1.0 required=10.0 tests=SPF_HELO_SOFTFAIL X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [64.78.21.128] (HELO mis011-1.exch011.intermedia.net) (64.78.21.128) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Jul 2005 10:47:33 -0700 Received: from ehost011-1.exch011.intermedia.net ([64.78.21.3]) by mis011-1.exch011.intermedia.net with Microsoft SMTPSVC(6.0.3790.1830); Wed, 20 Jul 2005 10:47:36 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Searching for similar documents Date: Wed, 20 Jul 2005 10:47:35 -0700 Message-ID: <41EE526EC2D3C74286415780D3BA9F870CEB05CD@ehost011-1.exch011.intermedia.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Searching for similar documents Thread-Index: AcWMi6sU46GjCanVSjK2odRDqBOULAAx2biw From: "Derek Westfall" To: X-OriginalArrivalTime: 20 Jul 2005 17:47:36.0184 (UTC) FILETIME=[1D367F80:01C58D53] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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 and I am getting an error I don't understand when trying to instantiate the object from Cold Fusion. I also added the .class to a .jar and put it in \lib to no avail. I don't know if this is a CF problem or a Java problem. CF Error: Object Instantiation Exception. =20 An exception occurred when instantiating a java object. The cause of this exception was that: MoreLikeThis (wrong name: org/apache/lucene/search/similar/MoreLikeThis). =20 index=3D"\\www\lucene\myindex"; // get an IndexReader object to use in the constructor to the searcher var indexReader =3D CreateObject("java", "org.apache.lucene.index.IndexReader"); =09 // get an IndexSearcher object searcher =3D CreateObject("java", "org.apache.lucene.search.IndexSearcher"); searcher =3D searcher.init(indexReader.open(index)); // get an Analyzer object =20 analyzer =3D CreateObject("java", "org.apache.lucene.analysis.standard.StandardAnalyzer");=09 analyzer.init(); =09 mlt =3D CreateObject("java", "MoreLikeThis"); // <---- this is the line that causes the error mlt=3Dmlt.init(indexReader); =09 // [ I have also tried mlt =3D CreateObject("java", "org.apache.lucene.search.similar.MoreLikeThis");] target =3D "test of the similarity feature"; =09 query =3D mlt.like( target); hits =3D CreateObject("java", "org.apache.lucene.search.Hits"); hits =3D searcher.search(query); -----Original Message----- From: Erik Hatcher [mailto:erik@ehatchersolutions.com]=20 Sent: Tuesday, July 19, 2005 10:59 AM To: java-user@lucene.apache.org Subject: Re: Searching for similar documents On Jul 19, 2005, at 12:42 PM, Kadlabalu, Hareesh wrote: > If someone could someone please extract a version of this file from=20 > source control that corresponds to lucene 1.4.3 or if this can file=20 > can be back-ported, it would be greatly helpful. The old Jakarta Lucene Sandbox is still available via CVS: cvs -d:pserver:anoncvs@cvs.apache.org:/home/cvspublic co jakarta- lucene-sandbox > 1. > IndexReader.getFieldNames( IndexReader.FieldOption.INDEXED ) does not=20 > compile on 1.4.3, replace with IndexReader.getIndexedFieldNames ( true > )? I think you want false, not true. The boolean flag refers to term vector data. > 2. > query.add(tq, BooleanClause.Occur.SHOULD) does not compile on 1.4.3,=20 > is this the same as query.add( tq, true, true )? No. It's the same as add(tq, false, false) > I have one small request, is it possible to make the archive of=20 > 'Contribution' section that corresponds to Lucene > 1.4.3 release available online? At this point we're probably too far removed from it to accomplish that cleanly. MoreLikeThis may not have ever been 1.4.3 compatible - I don't recall - it certainly wasn't added until well after 1.4.3 was released. The CVS repository should be sufficient for folks to build it themselves if necessary. For most of the old Sandbox contributions, you can find binary releases of those in the Lucene in Action code distribution at www.lucenebook.com Erik --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org