Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 67354 invoked from network); 30 Aug 2008 09:51:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Aug 2008 09:51:11 -0000 Received: (qmail 20163 invoked by uid 500); 30 Aug 2008 09:51:03 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 20125 invoked by uid 500); 30 Aug 2008 09:51:03 -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 20114 invoked by uid 99); 30 Aug 2008 09:51:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 30 Aug 2008 02:51:03 -0700 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [217.12.10.216] (HELO web26005.mail.ukl.yahoo.com) (217.12.10.216) by apache.org (qpsmtpd/0.29) with SMTP; Sat, 30 Aug 2008 09:50:03 +0000 Received: (qmail 5828 invoked by uid 60001); 30 Aug 2008 09:50:29 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=QkwI/KPETZOevGL9DiOyKXgz9+Nuttyt6/p8B5l2nTt59qczH2Inn492jHgDPBt1uz3ZpSNhUYbl3GSehkuOTO3fpA53tOlF5/A5h/hAPlWTysgFkB8MsFA2niRnAckaM/F/QsBDCzhefiSRejpmh+GAF4jZ+ibCizDt+wc07QU=; X-YMail-OSG: eMARRgoVM1lYXMbQIsn35uveBthWe_QCmGLHfJS8X4XcSc2j8XMiktx6eU1FZkOJRd.bt5QmIUhY9HN7sGbXEhhFUslu8yt81avugW9llm4qiE.e_Ip5RQy2sdl5UmfPRU2t.5brkmNo.zfrPSU1Y2H_ Received: from [194.106.34.5] by web26005.mail.ukl.yahoo.com via HTTP; Sat, 30 Aug 2008 09:50:29 GMT X-Mailer: YahooMailRC/1096.28 YahooMailWebService/0.7.218.2 Date: Sat, 30 Aug 2008 09:50:29 +0000 (GMT) From: mark harwood Subject: Re: MoreLikeThis return no results To: java-user@lucene.apache.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-ID: <834486.5819.qm@web26005.mail.ukl.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org MoreLikeThis needs to find the terms in your doc. It tries to do this by us= ing TermFreqVectors which are stored in the index if you choose to add them= at index-time. If you haven't done this then it will fall back to reanaly= sing the content of the document usings an analyser (despite what the javad= ocs for the setAnalyzer method say about not needing to set an analyzer wh= en MoreLiking an existing document).=0A=0ASo your options are probably to r= e-index with term vectors turned on or set an appropriate choice of analyze= r.=0A=0ACheers,=0AMark=0A(only 3 days to go until Tom Roberts is back in th= e office! )=0A=0A=0A=0A----- Original Message ----=0AFrom: davood =0ATo: java-user@lucene.apache.org=0ASent: Saturday, 30 August, = 2008 7:05:35=0ASubject: MoreLikeThis return no results=0A=0A=0AHi,=0A=0AI'm= trying to get MoreLikeThis working but it just returns no results. I=0Ahav= e lucene working for normal queries and indexing but MoreLikeThis Just=0Are= turns nothing. This is what I'm trying=0A=0A=0AIndexReader reader =3D Index= Reader.open(INDEX_PATH);=0AIndexSearcher searcher =3D new IndexSearcher(IND= EX_PATH);=0AMoreLikeThis likeThis =3D new MoreLikeThis(reader);=0AlikeThis.= setFieldNames(new String[] { "tag" ,"tit"});=0AQuery likesQuery =3D likeThi= s.like(170); // document number I already=0Aretrieved by hits.id(0) =0AHits= likesHits =3D searcher.search(likesQuery); =0AIt find nothing simil= ar=0A=0ABtw I've noticed similarity contributed package inside of lucene co= ntains=0Anothing (a jar file with a license text file and another text file= ), I've=0Atried donloading it from subversion but there was no java class t= here, So I=0Ahad to get it from another web site. Why it's removed from sub= version?=0Ahttp://svn.apache.org/repos/asf/lucene/java/trunk/contrib/simila= rity/src/java/org/apache/lucene/search/similar/=0A=0ABest.=0A-- =0AView thi= s message in context: http://www.nabble.com/MoreLikeThis-return-no-results-= tp19230752p19230752.html=0ASent from the Lucene - Java Users mailing list a= rchive at Nabble.com.=0A=0A=0A---------------------------------------------= ------------------------=0ATo unsubscribe, e-mail: java-user-unsubscribe@lu= cene.apache.org=0AFor additional commands, e-mail: java-user-help@lucene.ap= ache.org=0A=0ASend instant messages to your online friends http://uk.messen= ger.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org