lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mark harwood <markharw...@yahoo.co.uk>
Subject Re: MoreLikeThis return no results
Date Mon, 01 Sep 2008 14:52:12 GMT
MoreLikeThis essentially shortlists a large list of terms (found in example text or an existing
doc) and uses them in a query.
To see what terms have been shortlisted try calling query.rewrite(reader) and then call toString()
or extractTerms.

If this reveals no terms try using a debugger which should help you step through MLT's shortlisting
logic and reveal the issue (e.g. can't find TermVector or all terms are greater than chosen
doc frequency setting).




----- Original Message ----
From: davood <dave.fet@gmail.com>
To: java-user@lucene.apache.org
Sent: Monday, 1 September, 2008 14:16:42
Subject: Re: MoreLikeThis return no results


Hi,

I enabled the TermVector for  required fields using following piece of code,
Field titleField = new Field("title", title, Field.Store.NO,
Field.Index.TOKENIZED, TermVector.YES);
and then re-indexed it. But again it shows no result. 
I checked the stored documents and they TermVector exists and si correct but
morelikethis return no result for a given document id.

What am I missing? 


mark harwood wrote:
> 
> 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! ) 
> 

-- 
View this message in context: http://www.nabble.com/Re%3A-MoreLikeThis-return-no-results-tp19230763p19254591.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
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


Mime
View raw message