lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Smith <>
Subject MoreLikeThis Interface changes
Date Thu, 22 Sep 2011 00:17:27 GMT
I'm updating my lucene code from 3.0 to 3.4.  There's a change in the MLT interface I'm confused
about.  I used the method.  It now appears I should change to the,
fieldname) method.  Easy enough to create an InputStreamReader from an InputStream.

So, my question is regarding the addition of the fieldname parameter.  There's also a call
called MLT.setFieldNames(String[]).  This would seem to be redundant except the setFieldNames()
allows you to specify multiple fields and like() doesn't.  Am I allowed to specify null as
the fieldname in like() (documentation doesn't say you can).  It seems like you shouldn't
need to do both.  But there's a difference in functionality between the two (since one allows
multiple fields and the other doesn't).

As a second question, is it possible to do something where you boost the MLT words from the
subject and as opposed to the body of the document you are looking for similar items on?



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message