get cosine similarity between two documents in lucene

后端 未结 7 2156
野性不改
野性不改 2020-11-27 03:13

i have built an index in Lucene. I want without specifying a query, just to get a score (cosine similarity or another distance?) between two documents in the index.

7条回答
  •  孤街浪徒
    2020-11-27 04:04

    I know question has been answered, but for the people who might come here in future, nice example of the solution can be found here:

    http://sujitpal.blogspot.ch/2011/10/computing-document-similarity-using.html

提交回复
热议问题