Building the search index
In this lesson, the full
index build is ready to run as the fields and the extraction mappings
have been completed.About this task
Procedure
Stop the WebSphere Commerce server.
- In a command prompt, navigate to the following directory:
- WC_installdir/bin
WCDE_installdir\bin
- Run the preprocessing utility:


di-preprocess.sh WC_installdir/instances/instance_name/search/pre-processConfig/MC_masterCatalogId/target_db
di-preprocess.bat WC_installdir/instances/instance_name/search/pre-processConfig/MC_masterCatalogId/target_db
di-preprocess.bat WCDE_installdir\search\pre-processConfig\MC_masterCatalogId\development_db
Start the WebSphere Commerce server.
- In a command prompt,
navigate to the following directory:
- WC_installdir/bin
WCDE_installdir\bin
- Run the index building utility for
the custom data:
di-buildindex.bat -instance instance_name -masterCatalogId masterCatalogId -dbuser dbuser_Id -dbuserpwd dbuserpassword

di-buildindex.sh -instance instance_name -masterCatalogId masterCatalogId -dbuser dbuser_Id -dbuserpwd dbuserpassword
di-buildindex.bat -masterCatalogId masterCatalogId
For example:
di-buildindex.bat -instance demo
-masterCatalogId 11301 -dbuser wcs -dbuserpwd mypassword

di-buildindex.sh -instance
demo -masterCatalogId 11301 -dbuser wcs -dbuserpwd mypassword
di-buildindex.bat -masterCatalogId
10001
For more information about the index building utility parameters, see di-buildindex utility.
- Verify that the index is populated with the warranty data
successfully by navigating to the following URL:
http://localhost/solr/MC_masterCatalogId_CatalogEntry_en_US/select?q=catentry_id:10251


http://host_name:solr-port/solr/MC_masterCatalogId_CatalogEntry_en_US/select?q=catentry_id:10251
The URL returns all the results from the index directly. Ensure that warranty fields are also displayed in the results for the products that had warranty data in the database schema table. The following snippet is an example of the results that are returned from the index:- <doc> <int name="buyable">1</int> <str name="careinstruction">Never use household cleaners</str> - <arr name="catalog_id"> <long>10001</long> </arr> <long name="catentry_id">10005</long> <str name="catenttype_id_ntk_cs">ProductBean</str> <str name="fillImage">Images/catalog/furniture/furniture_160x160</str> <str name="longDescription">Wing chair to complement any decor.</str> <long name="member_id">700000000000000002</long> <str name="name">White Wing Chair</str> - <arr name="parentCatgroup_id_facet"> <str>10001_10004</str> </arr> - <arr name="parentCatgroup_id_search"> <str>10001_10004</str> <str>10001_10001</str> </arr> <str name="partNumber_ntk">FULO-03</str> <float name="price_USD">499.99</float> <int name="published">1</int> - <arr name="sequence"> <10001_10004_4.00000</str> <10001_10004_4.00000</str> </arr> <str name="shortDescription">Wing chair to complement any decor.</str> <int name="storeent_id">10001</int> <str name="thumbnail">images/catalog/furniture/furniture_70x70/</str> <str name="warterm">60</str> <str name="wartype">LIMITED</str>