Lucene numDocs and doqFreq on custom similarity class

Posted by David A on Stack Overflow See other posts from Stack Overflow or by David A
Published on 2010-04-05T16:02:11Z Indexed on 2010/04/05 16:03 UTC
Read the original article Hit count: 445

Filed under:
|
|

Hi All, im doing an aplication with Lucene (im a noob with it) and im facing some problems. My aplication uses the Lucene 2.4.0 library with a custom similaraty implementation (the jar is imported)

In my app im calculating doqFreq and numDocs manually (im adding the values of all indexes and then i calculate a global value in order to use it on every query) and i want to use that values on a custom similarity implementation in order to calculate a new IDF.

The problem is that I dont know how to use (or send) the new doqFreq and numDocs values from my app on that new similarty implementation as I dont want to change lucene´s code apart from this extra class.

Any suggestions or examples? I read the docs but i dont now how to aproach this :s

Thanks

© Stack Overflow or respective owner

Related posts about lucene

Related posts about tfidf