lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Lavin <>
Subject Cosine Similarity Using Two or More Terms`
Date Thu, 07 Mar 2013 14:30:45 GMT

Dear Users,

I'm calculation cosine similarity between two documents using code based 
on the code at this link...

Is it working fine, but I want to use terms from two different fields in 
my indexed documents.

Specifically, I need to know how to add the term.text to the 
<String,int> hashmap (around line 28 in the code on the page/link above).

Does anyone have a working code sample for doing this? Or perhaps 
outline what needs to happen to get both sets of terms into the hashmap?

any help appreciated,


with best regards,
Peter Lavin,
PhD Candidate,
CAG - Computer Architecture & Grid Research Group,
Lloyd Institute, 005,
Trinity College Dublin, Ireland.
+353 1 8961536

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message