« Return to Thread: Relevance's scores on TopFieldCollector/FieldComparator

Re: Relevance's scores on TopFieldCollector/FieldComparator

by Raimon Bosch :: Rate this Message:

Reply to Author | View in Thread


It Worked for me changing:

public void setScorer(Scorer scorer) {
      this.scorer = new ScoreCachingWrappingScorer(scorer);
}

by

public void setScorer(Scorer scorer) {
      this.scorer = scorer;
}

in my PseudoRandomFieldComparator.

Regards,
Raimon Bosch.

Raimon Bosch wrote:
Hi,

I've just implemented my PseudoRandomFieldComparator (migrated from PseudoRandomComparatorSource) on Solr. The problem that I see is that I don't have acces to the relevance's scores like in the deprecated class ComparatorSource.

I saw that the TopFieldCollector is filling the scorer of my PseudoRandomFieldComparator, but the method scorer.score() is always returning 0. It's like we pass correctly the scorer, but the scorer is making reference to a wrong scores's array.

How can I have my relevance's scores on my PseudoRandomFieldComparator? Any ideas?


Regards,
Raimon Bosch.

 « Return to Thread: Relevance's scores on TopFieldCollector/FieldComparator