Class TokenCoverageRankingStrategy

java.lang.Object
ubic.gemma.rest.ranking.TokenCoverageRankingStrategy
All Implemented Interfaces:
AnnotationSearchRankingStrategy

@Component("coverage") public class TokenCoverageRankingStrategy extends Object implements AnnotationSearchRankingStrategy
Re-orders hits by what fraction of the query tokens appear in the hit's lowercased value. Primary sort: coverage descending. Secondary sort: original Lucene rank ascending (stable relative to the input order for hits with identical coverage).

Empty / blank queries are short-circuited: the input order is returned unchanged so the caller's choice of upstream ordering wins.

  • Field Details

  • Constructor Details

    • TokenCoverageRankingStrategy

      public TokenCoverageRankingStrategy()
  • Method Details