On Sun, May 28, 2006 at 07:36:25AM +0900, David Balmain wrote: > On 5/28/06, Jeroen Bulters <[EMAIL PROTECTED]> wrote: > > David Balmain wrote: > > > Until now I haven't really used the TermVectors so this probably isn't > > > the best way to do it but here goes (this is very rough); > > > > I'm going to try this out now. I'll also try extracting all term vectors > > from doc1 and using them as a query on doc2 (using a BooleanQuery). They > > use this kind of method in "Lucene in Action" (somewhere around page 190 > > if I recall correctly). > > If it's a "More Like This" query that you are trying to write, I > recommend you look at the Lucene code here; > > > http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_0/contrib/similarity/src/java/org/apache/lucene/search/similar/MoreLikeThis.java?revision=409698&view=markup
or you check out the port of this that lives in acts_as_ferret :-) http://projects.jkraemer.net/acts_as_ferret/browser/trunk/plugin/acts_as_ferret/lib/acts_as_ferret.rb from Line 525 till around 720. > It's part of Lucene 2.0 now. I'll be adding MoreLikeThis Queries in > the near future. Dave, that's a nice idea. Should I try to prepare a patch for this based on what I did in acts_as_ferret ? Would be ruby-only, though. But as the whole more like this thing more or less is about building a BooleanQuery, I think speed is no issue here. Jens -- webit! Gesellschaft für neue Medien mbH www.webit.de Dipl.-Wirtschaftsingenieur Jens Krämer [EMAIL PROTECTED] Schnorrstraße 76 Tel +49 351 46766 0 D-01069 Dresden Fax +49 351 46766 66 _______________________________________________ Ferret-talk mailing list [email protected] http://rubyforge.org/mailman/listinfo/ferret-talk

