summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/solr/apache_solr.py
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2023-08-29 10:41:22 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2023-08-29 10:41:22 +0700
commit6ed2316f6aa446bcd5bc7e6cd4d0c0a1136096dd (patch)
tree62e6556b8c7fa6fd6f6085b3b3e6ef00b78ee713 /indoteknik_custom/models/solr/apache_solr.py
parent315b832420eb8314e809b1c0f549304d423b45f3 (diff)
Update apache solr
- Create get tier name pricelist - Create solr results on product.template and product.product - Fix get active flash sale on product template - Update name "get_single_doc" to "get_doc" in apache solr model - Add product ids on sync category homepage to solr
Diffstat (limited to 'indoteknik_custom/models/solr/apache_solr.py')
-rw-r--r--indoteknik_custom/models/solr/apache_solr.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/indoteknik_custom/models/solr/apache_solr.py b/indoteknik_custom/models/solr/apache_solr.py
index cb44e7ed..3be37a5a 100644
--- a/indoteknik_custom/models/solr/apache_solr.py
+++ b/indoteknik_custom/models/solr/apache_solr.py
@@ -27,7 +27,7 @@ class ApacheSolr(models.Model):
return pysolr.Solr(url + schema, always_commit=True, timeout=30)
- def get_single_doc(self, schema, id):
+ def get_doc(self, schema, id):
try:
return self.connect(schema).search(f'id:{id}').docs[0]
except:
@@ -53,7 +53,6 @@ class ApacheSolr(models.Model):
new_dict[cleaned_key] = value
return new_dict
-
def _update_stock_product_to_solr(self, limit=10000):
current_time = datetime.now()
delta_time = current_time - timedelta(days=3)