You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Vaijanathrao <va...@corp.aol.com> on 2009/11/06 12:37:30 UTC
PhraseQuery Problem
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