lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrien Grand <jpou...@gmail.com>
Subject Re: Lucene 6.1: number of hits per document
Date Thu, 01 Sep 2016 13:07:39 GMT
IndexSearcher will call LeafCollector.setScorer(Scorer) for you when you
call IndexSearcher.search(Query, Collector). All you need to do is to keep
a reference to this Scorer object and use it in the
LeafCollector.collect(int) method.

Le jeu. 1 sept. 2016 à 14:42, szzoli <reg9szabo@freemail.hu> a écrit :

> I created a collector with
> SimpleCollector collector = new TotalHitCountCollector();
> but when I wanted to call
> collector.setScorer(scorer);
> the scorer has again several parameters:
> Scorer scorer = new ConstantScoreScorer(Weight, float, disi);
> Do I have to create these objects, too?
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Lucene-6-1-number-of-hits-per-document-tp4293245p4294286.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message