MoreLikeThis needs to find the terms in your doc. It tries to do this by using 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 reanalysing the content of the document usings an analyser (despite what the javadocs for the setAnalyzer method say about not needing to set an analyzer when MoreLiking an existing document).
So your options are probably to re-index with term vectors turned on or set an appropriate choice of analyzer. Cheers, Mark (only 3 days to go until Tom Roberts is back in the office! ) ----- Original Message ---- From: davood <[EMAIL PROTECTED]> To: java-user@lucene.apache.org Sent: Saturday, 30 August, 2008 7:05:35 Subject: MoreLikeThis return no results Hi, I'm trying to get MoreLikeThis working but it just returns no results. I have lucene working for normal queries and indexing but MoreLikeThis Just returns nothing. This is what I'm trying IndexReader reader = IndexReader.open(INDEX_PATH); IndexSearcher searcher = new IndexSearcher(INDEX_PATH); MoreLikeThis likeThis = new MoreLikeThis(reader); likeThis.setFieldNames(new String[] { "tag" ,"tit"}); Query likesQuery = likeThis.like(170); // document number I already retrieved by hits.id(0) Hits likesHits = searcher.search(likesQuery); It find nothing similar Btw I've noticed similarity contributed package inside of lucene contains nothing (a jar file with a license text file and another text file), I've tried donloading it from subversion but there was no java class there, So I had to get it from another web site. Why it's removed from subversion? http://svn.apache.org/repos/asf/lucene/java/trunk/contrib/similarity/src/java/org/apache/lucene/search/similar/ Best. -- View this message in context: http://www.nabble.com/MoreLikeThis-return-no-results-tp19230752p19230752.html Sent from the Lucene - Java Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Send instant messages to your online friends http://uk.messenger.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]