In earlier versions of WebSphere Commerce (FEP7 and lower), prices were only be indexed by currency (price_USD, price_CAD, price_EUR, etc). This was a limitation for stores that use contracts, as they could only index one price per currency but they would need to have numerous prices per currency. As a result, workarounds would be implemented such as creating custom price fields in the index, which can get tedious if there are a large amount of contracts being used.
With FEP8, we have introduced the price index. With the price index in place, we can now index prices by currency as well as the contract that they apply to. To do this, there are two main steps for using the price index:
Calculate prices by either manually running di-calculateprice script or running the ContractPriceCalculate scheduled job.
When calculating the price, you can choose to use full price calculation or white list calculation by updating the parameters used for the script or scheduled job. Think of the difference as similar to the idea behind full and delta indexing. With full price calculation, all previously calculated prices will be removed from the index and replaced with the newly generated prices. With white list calculation, only the contracts, currencies, or catentries specified will be updated in the index.
Perform indexing as usual.
After doing this, instead of our original price field formatting of price_<currency> (ex. price_USD), we will now use a new price field formatting for prices for a particular contract: price_<currency>_<contract_id> (ex. price_USD for contract 10001 would be price_USD_10001).
To setup the price index, you will need to run setupSearchIndex again to take advantage of new preprocessing xmls that will be used for the price index, as well as changes to STORECONF to use the price index. The specific steps for setting up the price index can be seen on the following Knowledge Center page: http://www-01.ibm.com/support/knowledgecenter/SSZLC2_7.0.0/com.ibm.commerce.developer.doc/tasks/tsdsearchcalculateprice.htm?lang=en
For more information about the price index, as well as information about customizing the price index can be found of the following Knowledge Center page: http://www-01.ibm.com/support/knowledgecenter/SSZLC2_7.0.0/com.ibm.commerce.developer.doc/concepts/csdsearchindexprice.htm?lang=en