Factor out batch indexing logic into a ChangeBatchIndexer

Change-Id: Ief166fadc61f76a5f4ffdb879322e9883040bdd6
This commit is contained in:
Dave Borowitz
2013-06-27 14:41:21 -06:00
parent d103b2b61c
commit 2361cefe17
11 changed files with 436 additions and 297 deletions

View File

@@ -325,13 +325,14 @@ class SolrChangeIndex implements ChangeIndex, LifecycleListener {
}
@Override
public void markReady() throws IOException {
public void markReady(boolean ready) throws IOException {
// TODO Move the schema version information to a special meta-document
FileBasedConfig cfg = new FileBasedConfig(
solrIndexConfig(sitePaths),
FS.detect());
for (Map.Entry<String, Integer> e : SCHEMA_VERSIONS.entrySet()) {
cfg.setInt("index", e.getKey(), "schemaVersion", e.getValue());
cfg.setInt("index", e.getKey(), "schemaVersion",
ready ? e.getValue() : -1);
}
cfg.save();
}