summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indoteknik_custom/models/apache_solr.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/indoteknik_custom/models/apache_solr.py b/indoteknik_custom/models/apache_solr.py
index 1f84e252..50f3d8f1 100644
--- a/indoteknik_custom/models/apache_solr.py
+++ b/indoteknik_custom/models/apache_solr.py
@@ -13,11 +13,12 @@ class ApacheSolr(models.Model):
def _sync_product_to_solr(self):
_logger.info('run sync to solr...')
- solr = pysolr.Solr('http://10.148.0.5:8983/solr/product/', always_commit=True, timeout=100)
+ solr = pysolr.Solr('http://192.168.23.5:8983/solr/product/', always_commit=True, timeout=100)
templates = self.env['product.template'].search([
('solr_flag', '=', 0),
- ('type', '=', 'product')
+ ('type', '=', 'product'),
+ ('active', '=', True)
# ('id', '=', 21560)
], limit=500)
document = []
@@ -62,8 +63,7 @@ class ApacheSolr(models.Model):
'variants_name_t': variants_name,
'variants_code_t': variants_code,
'search_rank_i': template.search_rank,
- 'search_rank_weekly_i': template.search_rank_weekly,
- 'active_b': template.active
+ 'search_rank_weekly_i': template.search_rank_weekly
})]
solr.add(document)
template.solr_flag = 1