Permalink
Browse files

include defaults JSON in database signature.

  • Loading branch information...
1 parent 7a2bbd4 commit f0ac36817951156366152c9b79e5248e116603a4 Robert Newson committed May 3, 2009
@@ -176,8 +176,9 @@ private synchronized void updateIndex() throws IOException {
if (fulltext != null) {
delete_all = false;
for (final Object key : fulltext.keySet()) {
- final String defaults = fulltext.getJSONObject((String) key).optString("defaults", "{}");
-
+ final String defaults = fulltext.getJSONObject((String) key)
+ .optString("defaults", "{}");
+
String fun = fulltext.getJSONObject((String) key).getString("index");
fun = fun.replaceAll("^\"*", "");
fun = fun.replaceAll("\"*$", "");
@@ -291,7 +292,7 @@ private boolean updateDatabase(final IndexWriter writer, final String dbname, fi
if (result) {
progress.update(viewname, new_sig, update_seq);
- Utils.LOG.info(viewname + ": index caught up to " + update_seq);
+ Utils.LOG.info(viewname + ": index caught up to " + update_seq + ".");
}
return result;
@@ -117,7 +117,7 @@ private static String loadResource(final String name) throws IOException {
}
public String getSignature() {
- return Utils.digest(fun);
+ return Utils.digest(this.context.getThreadLocal("defaults") + fun);
}
public void close() {

0 comments on commit f0ac368

Please sign in to comment.