| Line 174... |
Line 174... |
| 174 |
tags = itemMap['tagPricing']
|
174 |
tags = itemMap['tagPricing']
|
| 175 |
for tag in tags:
|
175 |
for tag in tags:
|
| 176 |
itemObj = {'id':('itemtag-%s-%s'%(itemId, tag.tag_id)), 'color_s':itemMap['color'], 'itemId_i': itemId, 'tagId_i':tag.tag_id,
|
176 |
itemObj = {'id':('itemtag-%s-%s'%(itemId, tag.tag_id)), 'color_s':itemMap['color'], 'itemId_i': itemId, 'tagId_i':tag.tag_id,
|
| 177 |
'mop_f': tag.mop, 'sellingPrice_f': tag.selling_price}
|
177 |
'mop_f': tag.mop, 'sellingPrice_f': tag.selling_price}
|
| 178 |
itemObjs.append(itemObj)
|
178 |
itemObjs.append(itemObj)
|
| 179 |
catalogObj = {'id':'catalog' + str(catalogId), 'rank_i':catalogMap['rank'], 'title_s': catalogMap['title'], '_childDocuments_':itemObjs, 'catalogId_i':catalogId}
|
179 |
catalogObj = {'id':'catalog' + str(catalogId), 'rank_i':catalogMap['rank'], 'title_s': catalogMap['title'], '_childDocuments_':itemObjs, 'catalogId_i':catalogId, 'imageUrl_s': catalogMap['imageUrl']}
|
| 180 |
catalogObjs.append(catalogObj)
|
180 |
catalogObjs.append(catalogObj)
|
| 181 |
catalogObjs[0]['_childDocuments_'].append({'id':'dummy', "color_s":"Black","itemId_i":1, "mop_f":460.0, "tagId_i":2, "sellingPrice_f":500.0})
|
- |
|
| 182 |
solr.delete(q='*:*')
|
181 |
solr.delete(q='*:*')
|
| 183 |
solr.add(catalogObjs)
|
182 |
solr.add(catalogObjs)
|
| 184 |
|
183 |
|
| 185 |
|
184 |
|
| 186 |
|
185 |
|