Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-User

PhraseQuery Problem

 

 

Lucene java-user RSS feed   Index | Next | Previous | View Threaded


vaijanath.rao at corp

Nov 6, 2009, 3:37 AM

Post #1 of 1 (88 views)
Permalink
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[at]lucene.apache.org
For additional commands, e-mail: java-user-help[at]lucene.apache.org

Lucene java-user RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.