lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mark harwood <>
Subject Re: MoreLikeThis return no results
Date Sat, 30 Aug 2008 09:50:29 GMT
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.

(only 3 days to go until Tom Roberts is back in the office! )

----- Original Message ----
From: davood <>
Sent: Saturday, 30 August, 2008 7:05:35
Subject: MoreLikeThis return no results


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 =;
IndexSearcher searcher = new IndexSearcher(INDEX_PATH);
MoreLikeThis likeThis = new MoreLikeThis(reader);
likeThis.setFieldNames(new String[] { "tag" ,"tit"});
Query likesQuery =; // document number I already
retrieved by 
Hits likesHits =;        
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?

View this message in context:
Sent from the Lucene - Java Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

Send instant messages to your online friends 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message