title: How to find the document similarity using Lucene or cosine similarity
body: <p>Hi guys I'm doing a web project &amp; it has a function to find the similarity between two documents. these documents are text files. So i need to use cosine similarity or lucene to do this. can anyone help me to do this?i couldnt find any code sample for this. What i need is code sample for finding document similarity using lucene or cosine similarity.Please help me to overcome this problem. (i'm developing the program using java.please provide me complete code sample for this). thanks in advance.</p>