Adrien: "If the Query is a TermQuery, you can get this number by calling Scorer.freq() on the Scorer that is passed to Collector.setScorer()."
My problem is that I do not know how can one get Scorer.freq(). Scorer is an abstect class. It has many deived classes. I don't know wich one to use. The derived classes are sometimes also abstract. The non-abstract classes have constuctors with some other class parameters (Weight float score, DocIdSetIterator for ConstantScoreScorer, e.g.) Some of them are also abstract. Now again I have to look for some subclasses. They also might be abstract, or have constuctors with several class parameters, ans so on... How can I get to Scorer.freq() so that the Scorer sould know, which Documentt's hits I am seaching for? Can you show me an example? Thank you. -- View this message in context: http://lucene.472066.n3.nabble.com/Lucene-6-1-number-of-hits-per-document-tp4293245p4294279.html Sent from the Lucene - Java Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org