Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

include defaults JSON in database signature.

  • Loading branch information...
commit f0ac36817951156366152c9b79e5248e116603a4 1 parent 7a2bbd4
Robert Newson authored
7 src/main/java/com/github/rnewson/couchdb/lucene/Index.java
View
@@ -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;
2  src/main/java/com/github/rnewson/couchdb/lucene/Rhino.java
View
@@ -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() {
Please sign in to comment.
Something went wrong with that request. Please try again.