summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indoteknik_custom/models/apache_solr.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/indoteknik_custom/models/apache_solr.py b/indoteknik_custom/models/apache_solr.py
index 65e875cc..1f84e252 100644
--- a/indoteknik_custom/models/apache_solr.py
+++ b/indoteknik_custom/models/apache_solr.py
@@ -13,10 +13,11 @@ 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/', timeout=100)
+ solr = pysolr.Solr('http://10.148.0.5:8983/solr/product/', always_commit=True, timeout=100)
templates = self.env['product.template'].search([
('solr_flag', '=', 0),
+ ('type', '=', 'product')
# ('id', '=', 21560)
], limit=500)
document = []