added ybr selection for remote search

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1119 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 19 years ago
parent 0e25020f51
commit b9cc9029e3

@ -91,7 +91,7 @@ public final class search {
}
final long timestamp = System.currentTimeMillis();
plasmaSearchQuery squery = new plasmaSearchQuery(keyhashes, new String[]{plasmaSearchQuery.ORDER_QUALITY, plasmaSearchQuery.ORDER_DATE},
plasmaSearchQuery squery = new plasmaSearchQuery(keyhashes, new String[]{plasmaSearchQuery.ORDER_YBR, plasmaSearchQuery.ORDER_DATE, plasmaSearchQuery.ORDER_QUALITY},
count, duetime, ".*");
prop = sb.searchFromRemote(squery);

@ -52,6 +52,7 @@ import java.net.MalformedURLException;
import java.util.Iterator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.TreeSet;
import de.anomic.kelondro.kelondroAttrSeq;
import de.anomic.server.serverCodings;
@ -169,9 +170,9 @@ public class plasmaRankingRCIEvaluation {
return partition.length - 1;
}
public static HashSet[] genRankingTable(kelondroAttrSeq rci, int[] partition) {
HashSet[] ranked = new HashSet[partition.length];
for (int i = 0; i < partition.length; i++) ranked[i] = new HashSet();
public static TreeSet[] genRankingTable(kelondroAttrSeq rci, int[] partition) {
TreeSet[] ranked = new TreeSet[partition.length];
for (int i = 0; i < partition.length; i++) ranked[i] = new TreeSet();
Iterator i = rci.keys();
String key;
kelondroAttrSeq.Entry entry;
@ -199,7 +200,7 @@ public class plasmaRankingRCIEvaluation {
return dommap;
}
public static void storeRankingTable(HashSet[] ranking, File tablePath) throws IOException {
public static void storeRankingTable(TreeSet[] ranking, File tablePath) throws IOException {
String hash;
String filename;
if (!(tablePath.exists())) tablePath.mkdirs();
@ -219,7 +220,7 @@ public class plasmaRankingRCIEvaluation {
final kelondroAttrSeq rci = new kelondroAttrSeq(rci_file, false);
int counts[] = rcieval(rci);
int[] partition = interval(counts, 16);
HashSet[] ranked = genRankingTable(rci, partition);
TreeSet[] ranked = genRankingTable(rci, partition);
storeRankingTable(ranked, new File(root_path, "ranking/YBR"));
long seconds = java.lang.Math.max(1, (System.currentTimeMillis() - start) / 1000);
System.out.println("Finished YBR generation in " + seconds + " seconds.");
@ -252,7 +253,7 @@ public class plasmaRankingRCIEvaluation {
System.out.println("sum of all references: " + sum);
// now print out the table
HashSet[] ranked = genRankingTable(rci, partition);
TreeSet[] ranked = genRankingTable(rci, partition);
HashMap dommap = genReverseDomHash(new File(root_path, "domlist.txt"));
String hash, dom;
for (int i = 0; i < 9; i++) {

Loading…
Cancel
Save