: I ask this because I need to return the frequency of the search terms : with each of my results, I tried using the TermFreqVector object but : unfortunately it was not fast enough, so I decided to modifiy lucene to : be able to return the frequency the same way the score is returned by : org.apache.lucene.search.Hits. ... : I started by adding public abstract int freq(); in package : org.apache.lucene.search.Scorerabstract class, and then modified : everyimplementation of Scorer to be able to get the frequency.
can you elaborate on: * how you were trying to use TermFreqVector * how you define "fast enough" * how you are now getting the freq() value in all of the Scorer classes? If all you need to know is the frequency of each term in your query (and not hte frequency of all terms in teh document) did you try using the freq() method in the TermDocs iterator instead of the TermFreqVector class? using Query.extractTerms, and then getting a TermDocs instance and iterating over those terms using seek and over the docids from your results using skipTo should be an extremely fast way to get the freq() info. : It works well and fast, the only problem I have is that I did not find a : way to compute the frequency in both ConstantScoreQuery.java and : MatchAllDocsQuery.java internal scorers. neither of those queries involve any terms, so i'm not sure what freq() would even make sense ... "1" or "0" i would imagine. -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]