yacy_search_server/source/de/anomic/yacy/yacyBuildProperties.java
orbiter b45701d20f this is a re-implementation of the YaCy Block Rank feature
This time it works like this:
- each peer provides its ranking information using the yacy/idx.json servlet
- peers with more than 1 GB ram will load this information from all other peers, combine that into one ranking table and store it locally. This happens during the start-up of the peer concurrently. The new generated file with the ranking information is at DATA/INDEX/<network>/QUEUES/hostIndex.blob
- this index is then computed to generate a new fresh ranking table. Peers which can calculate their own ranking table will do that every start-up to get latest feature updates until the feature is stable
- I computed new ranking tables as part of the distribition and commit it here also
- the YBR feature must be enabled manually by setting the YBR value in the ranking servlet to level 15. A default configuration for that is also in the commit but it does not affect your current installation only fresh peers
- a recursive block rank refinement is implemented but disabled at this point. it needs more testing

Please play around with the ranking settings and see if this helped to make search results better.

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7729 6c8d7289-2bf4-0310-a012-ef5d649a1542
2011-05-18 14:26:28 +00:00

74 lines
1.6 KiB
Java

package de.anomic.yacy;
import java.util.Locale;
import java.util.regex.Pattern;
import de.anomic.yacy.yacyBuildProperties;
/**
* Properties set when compiling this release/version
*/
public final class yacyBuildProperties {
private yacyBuildProperties() {
}
/**
* returns the SVN-Revision Number as a String
*/
public static String getSVNRevision() {
final String revision = "@REPL_REVISION_NR@";
if (revision.contains("@") || revision.contains("$")) {
return "0";
}
return revision;
}
/**
* returns the version String (e. g. 0.9)
*/
public static String getVersion() {
if ("@REPL_VERSION@".contains("@") ) {
return "0.1";
}
return "@REPL_VERSION@";
}
public static final Pattern versionMatcher = Pattern.compile("\\A(\\d+\\.\\d{1,3})(\\d{0,5})\\z");
/**
* returns the long version String (e. g. 0.9106712)
*/
public static String getLongVersion() {
return String.format(Locale.US, "%.3f%05d", Float.valueOf(getVersion()), Integer.valueOf(getSVNRevision()));
}
/**
* returns the date, when this release was build
*/
public static String getBuildDate() {
if ("@REPL_DATE@".contains("@")) {
return "19700101";
}
return "@REPL_DATE@";
}
/**
* determines, if this release was compiled and installed
* by a package manager
*/
public static boolean isPkgManager() {
return "@REPL_PKGMANAGER@".equals("true");
}
/**
* returns command to use to restart the YaCy daemon,
* when YaCy was installed with a packagemanger
*/
public static String getRestartCmd() {
if ("@REPL_RESTARTCMD@".contains("@")) {
return "echo 'error'";
}
return "@REPL_RESTARTCMD@";
}
}