Stop spurious re-indexing of SOLR records
@@ -60,8 +60,7 @@ class Command(BaseCommand):
Q(raccess__public=True))
print("Django count = {}".format(dqs.count()))
- if sqs.count() != dqs.count():
- # what is in django that isn't in SOLR:
+ # what is in Django that isn't in SOLR:
found = set()
count = 0
for r in list(sqs):
@@ -75,15 +74,16 @@ class Command(BaseCommand):
r.short_id, resource.discovery_content_type))
count += 1
ind.update_object(r)
- elif ind.should_update(r):
- print("{} {} needs SOLR update: updating in index".format(
- r.short_id, resource.discovery_content_type))
- ind.update_object(r)
- count += 1
+ # # This always returns True whether or not SOLR needs updating
+ # elif ind.should_update(r):
+ # print("{} {} needs SOLR update: updating in index".format(
+ # r.short_id, resource.discovery_content_type))
+ # ind.update_object(r)
+ # count += 1
print("{} resources in Django refreshed in SOLR".format(count))
- # what is in SOLR that isn't in django:
+ # what is in SOLR that isn't in Django:
found = set()
count = 0
for r in list(dqs):
