lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vaijanathrao <vaijanath....@corp.aol.com>
Subject PhraseQuery Problem
Date Fri, 06 Nov 2009 11:37:30 GMT
Hi All,

One of things that we want to do in our application is to assign the score to a doc which
is  something like this
score = (# terms matched to the query) / ( total number of terms in the document for the field
). 

We want it to implement this as a part of PhraseQuery, as we also have other requirement.
But in PhraseQueryScorer we only get the phrases which have matched for a document but not
the total number of terms for the queried field. Is there a way i can get the total number
of terms in the document for that field without doing reader.doc(docId,fieldSelector ).

Can anyone suggest me alternate approaches for this. I am using lucene-2.4.1 


--Thanks and Regards
Vaijanath N. Rao
Senior Software Engineer
AOL India Pvt ltd

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message