I believe there a several ways of doing it. You can use the MoreLikeThis contribution at http://svn.apache.org/repos/asf/lucene/java/trunk/contrib/similarity or you can roll your own using the TermVector implementation. Basically, do your first search, get the term vector from the document you are interested in and then build a new query out of the terms of document A. I haven't used the first. The Lucene book also has a section on TermVectors and has similar examples.
>>> [EMAIL PROTECTED] 09/19/05 7:31 AM >>> Hi I was wondering how would you search for documents similar to a specified document using Lucene? The context would be that I categorise document A manually, and then search for documents with similar terms. Hopefully the documents returned would be in the same category/theme as document A. The system would eventually build up a set of documents for each category to match against. Peter Gelderbloem --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]