|
|
@ -80,7 +80,7 @@ public class plasmaSearchRankingProfile {
|
|
|
|
public static final String CATHASAUDIO = "cathasaudio";
|
|
|
|
public static final String CATHASAUDIO = "cathasaudio";
|
|
|
|
public static final String CATHASVIDEO = "cathasvideo";
|
|
|
|
public static final String CATHASVIDEO = "cathasvideo";
|
|
|
|
public static final String CATHASAPP = "cathasapp";
|
|
|
|
public static final String CATHASAPP = "cathasapp";
|
|
|
|
|
|
|
|
|
|
|
|
// post-sort predicates
|
|
|
|
// post-sort predicates
|
|
|
|
public static final String QUERYINURL = "queryinurl";
|
|
|
|
public static final String QUERYINURL = "queryinurl";
|
|
|
|
public static final String QUERYINDESCR = "queryindescr";
|
|
|
|
public static final String QUERYINDESCR = "queryindescr";
|
|
|
@ -287,16 +287,19 @@ public class plasmaSearchRankingProfile {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public long postRanking(
|
|
|
|
public long postRanking(
|
|
|
|
long preranking,
|
|
|
|
long ranking,
|
|
|
|
plasmaSearchQuery query,
|
|
|
|
plasmaSearchQuery query,
|
|
|
|
Set topwords,
|
|
|
|
Set topwords,
|
|
|
|
String[] urlcomps,
|
|
|
|
String[] urlcomps,
|
|
|
|
String[] descrcomps,
|
|
|
|
String[] descrcomps,
|
|
|
|
indexURLEntry page) {
|
|
|
|
indexURLEntry page) {
|
|
|
|
|
|
|
|
|
|
|
|
// apply pre-calculated order attributes
|
|
|
|
// for media search: prefer pages with many links
|
|
|
|
long ranking = preranking;
|
|
|
|
if (query.contentdom == plasmaSearchQuery.CONTENTDOM_IMAGE) ranking += page.limage() << coeff_cathasimage;
|
|
|
|
|
|
|
|
if (query.contentdom == plasmaSearchQuery.CONTENTDOM_AUDIO) ranking += page.limage() << coeff_cathasaudio;
|
|
|
|
|
|
|
|
if (query.contentdom == plasmaSearchQuery.CONTENTDOM_VIDEO) ranking += page.limage() << coeff_cathasvideo;
|
|
|
|
|
|
|
|
if (query.contentdom == plasmaSearchQuery.CONTENTDOM_APP ) ranking += page.limage() << coeff_cathasapp;
|
|
|
|
|
|
|
|
|
|
|
|
// prefer hit with 'prefer' pattern
|
|
|
|
// prefer hit with 'prefer' pattern
|
|
|
|
indexURLEntry.Components comp = page.comp();
|
|
|
|
indexURLEntry.Components comp = page.comp();
|
|
|
|
if (comp.url().toNormalform().matches(query.prefer)) ranking += 256 << coeff_prefer;
|
|
|
|
if (comp.url().toNormalform().matches(query.prefer)) ranking += 256 << coeff_prefer;
|
|
|
|