allura-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Brondsema <>
Subject default implementation for SearchIndexable.should_update_index
Date Wed, 24 Sep 2014 02:21:45 GMT
Is the following a reasonable change to should_update_index, or am I missing
anything?  I came across an issue where some of our extensions were setting a
value on a User, so the User got marked as 'dirty' in ming and thus the
ArtifactSessionExtension wanted to update the record in solr.  However, the
value set on the User was already at that value, so there was no actual change.

diff --git Allura/allura/lib/ Allura/allura/lib/
index 9c4a5f3..2ee9b82 100644
--- Allura/allura/lib/
+++ Allura/allura/lib/
@@ -80,13 +80,13 @@
     def should_update_index(self, old_doc, new_doc):
         """Determines if solr index should be updated.

         Values passed as old_doc and new_doc are original and modified
         versions of same object, represented as dictionaries.
-        return True
+        return old_doc != new_doc

Dave Brondsema : : personal : programming

View raw message