diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2023-05-09 14:53:06 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2023-05-09 14:53:06 +0700 |
| commit | 9e1882ea71a2861fc88884f7abdea99183123b8f (patch) | |
| tree | 2f2eacafcee63b87a0c7f78817717cc4aed607b0 | |
| parent | 11cbb8b3ce3e040ff98563c3c784fd315a217c3d (diff) | |
test
| -rw-r--r-- | indoteknik_custom/models/apache_solr.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/indoteknik_custom/models/apache_solr.py b/indoteknik_custom/models/apache_solr.py index 22e29627..31934835 100644 --- a/indoteknik_custom/models/apache_solr.py +++ b/indoteknik_custom/models/apache_solr.py @@ -6,8 +6,8 @@ import pysolr import time _logger = logging.getLogger(__name__) -# _solr = pysolr.Solr('http://10.148.0.5:8983/solr/product/', always_commit=True, timeout=30) -_solr = pysolr.Solr('http://34.101.189.218:8983/solr/product/', always_commit=True, timeout=30) # for development only +_solr = pysolr.Solr('http://10.148.0.5:8983/solr/product/', always_commit=True, timeout=30) +# _solr = pysolr.Solr('http://34.101.189.218:8983/solr/product/', always_commit=True, timeout=30) # for development only class ApacheSolr(models.Model): @@ -55,10 +55,10 @@ class ApacheSolr(models.Model): documents=[] for template in templates: rating = int(template.virtual_rating) - dict_rating = dict({"set":rating}) + dict_rating = dict({'set':rating}) document = { - "id": template.id, - "product_rating_f": dict_rating + 'id':template.id, + 'product_rating_f':dict_rating } documents.append(document) template.last_calculate_rating = current_time |
