diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2026-01-15 08:51:11 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2026-01-15 08:51:11 +0000 |
| commit | 74b5caa2ff4c30c824b243a8c621df590eab90e6 (patch) | |
| tree | ddb84b050e1f4430ab3458851bbdcc5e1d2ae6dd /indoteknik_custom/models/solr/apache_solr.py | |
| parent | fe5b09c1aa98723a3e0a3cf8174d6bc688c21bae (diff) | |
| parent | 25baecd1038b6b629e96d8b9eb9651bec95050b3 (diff) | |
Merged in magento-solr-v1 (pull request #474)
Magento solr v1
Diffstat (limited to 'indoteknik_custom/models/solr/apache_solr.py')
| -rw-r--r-- | indoteknik_custom/models/solr/apache_solr.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/indoteknik_custom/models/solr/apache_solr.py b/indoteknik_custom/models/solr/apache_solr.py index d111c1c1..21fb15d2 100644 --- a/indoteknik_custom/models/solr/apache_solr.py +++ b/indoteknik_custom/models/solr/apache_solr.py @@ -10,6 +10,9 @@ _logger = logging.getLogger(__name__) _solr = pysolr.Solr('http://10.148.0.5:8983/solr/product/', always_commit=True, timeout=30) _variants_solr = pysolr.Solr('http://10.148.0.5:8983/solr/variants/', always_commit=True, timeout=30) _recommendation_solr = pysolr.Solr('http://10.148.0.5:8983/solr/recommendation/', always_commit=True, timeout=30) +# _solr = pysolr.Solr('http://35.219.88.139/solr/product/', always_commit=True, timeout=30) +# _variants_solr = pysolr.Solr('http://35.219.88.139/solr/variants/', always_commit=True, timeout=30) +# _recommendation_solr = pysolr.Solr('http://35.219.88.139/solr/recommendation/', always_commit=True, timeout=30) # _solr = pysolr.Solr('http://34.101.189.218:8983/solr/product/', always_commit=True, timeout=30) # for development only @@ -255,6 +258,7 @@ class ApacheSolr(models.Model): 'id': variant.id, 'display_name_s': variant.display_name, 'name_s': variant.name, + 'search_keywords_t': variant.display_name, 'default_code_s': variant.default_code or '', 'product_rating_f': variant.product_tmpl_id.virtual_rating, 'product_id_i': variant.id, @@ -266,6 +270,9 @@ class ApacheSolr(models.Model): 'tax_f': tax, 'stock_total_f': variant.qty_stock_vendor, 'weight_f': variant.product_tmpl_id.weight, + 'has_magento_b': variant.has_magento, + 'attribute_set_id_i': variant.product_tmpl_id.x_attribute_set_id or 0, + 'attribute_set_name_s': variant.product_tmpl_id.x_attribute_set_name or '', 'manufacture_id_i': variant.product_tmpl_id.x_manufacture.id or 0, 'manufacture_name_s': variant.product_tmpl_id.x_manufacture.x_name or '', 'manufacture_name': variant.product_tmpl_id.x_manufacture.x_name or '', |
