- refactored all code which uses URIMetadataRow as standard for word hash length and word hash ordering and moved that to the class 'Word', becuase the class URIMetadataRow defined the old metadata data structure and should be superfluous in the future - removed unused methods from URIMetadataRow as preparation for further removal of that classpull/1/head
parent
d3de309953
commit
1ea17bd9f3
@ -1,36 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Migrate URLdb</title>
|
||||
#%env/templates/metas.template%#
|
||||
</head>
|
||||
<body>
|
||||
#%env/templates/header.template%#
|
||||
#%env/templates/submenuIndexControl.template%#
|
||||
|
||||
<h2>Migrate URLdb to embedded Solr Index</h2>
|
||||
|
||||
<p>Convert old meta data (urldb) index to embedded Solr fulltext index.</p>
|
||||
|
||||
<dl>
|
||||
<dd>
|
||||
<p>A low priority background job has been started which reads the old index, adds it to Solr and deletes the entry from the old index.</p>
|
||||
<p>The default "slow migration" updates any entry in the old urldb index upon access (e.g. during search events).<br />
|
||||
If you feel that the not accessed entries are still relevant, with this migration all entries from the old urldb index will be migrated.</p>
|
||||
<p>You may refresh this page to see how many entries in the old index are left for migration</p>
|
||||
<p>Hint: this background task runs until all entries are migrated or YaCy is shutdown. The migration is not automatically restarted.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<form action="migrateurldb_p.html" method="post" enctype="multipart/form-data" accept-charset="UTF-8">
|
||||
<fieldset>
|
||||
<input type="hidden" name="lastcount" value="#[lastcount]#" />
|
||||
<input type="hidden" name="lasttime" value="#[lasttime]#" />
|
||||
|
||||
<p><b>#[count]# entries</b> in old index left to migrate.</p>
|
||||
<p>For large indexes this may run for a long time (migration speed: #[speed]# entries per minute) <input type="submit" name="dorefresh" value="refresh" /></p>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
#%env/templates/footer.template%#
|
||||
</body>
|
||||
</html>
|
@ -1,44 +0,0 @@
|
||||
// migrateurldb_p.java
|
||||
|
||||
import net.yacy.cora.protocol.RequestHeader;
|
||||
import net.yacy.migration;
|
||||
import net.yacy.search.Switchboard;
|
||||
import net.yacy.server.serverObjects;
|
||||
import net.yacy.server.serverSwitch;
|
||||
|
||||
public class migrateurldb_p {
|
||||
|
||||
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
final serverObjects prop = new serverObjects();
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
|
||||
int cnt;
|
||||
|
||||
if ((cnt = migration.migrateUrldbtoSolr(sb)) > 0) {
|
||||
prop.put("count", cnt);
|
||||
|
||||
if (post != null && post.containsKey("dorefresh")) {
|
||||
int lastcount = post.getInt("lastcount", 0);
|
||||
Long t = post.getLong("lasttime", 1);
|
||||
|
||||
Double difft = (System.currentTimeMillis() - t) / 60000.0d;
|
||||
int diff = (int)((lastcount - cnt) / difft) ;
|
||||
prop.put("speed", diff);
|
||||
prop.put("lasttime", t);
|
||||
prop.put("lastcount", lastcount);
|
||||
|
||||
} else {
|
||||
prop.put("speed", "?");
|
||||
prop.put("lastcount",cnt);
|
||||
prop.put("lasttime", System.currentTimeMillis());
|
||||
}
|
||||
} else {
|
||||
prop.put("speed", "");
|
||||
prop.put("count", "no urldb index available");
|
||||
}
|
||||
|
||||
|
||||
// return rewrite properties
|
||||
return prop;
|
||||
}
|
||||
}
|
Loading…
Reference in new issue