Introduced in Feature Pack 2

Building the search index

Introduced in Feature Pack 2 In this lesson, the full index build is ready to run, since the fields and the extraction mappings are complete.

About this task

Procedure

  1. Start the WebSphere Commerce server.
  2. Navigate to the following directory:
    • WC_installdir/bin
    • WebSphere Commerce DeveloperWCDE_installdir\bin
  3. Run the index building utility for the custom data:
    • Windowsdi-buildindex.bat -instance instance -masterCatalogId masterCatalogId -dbuser wcs -dbuserpwd mypassword
    • SolarisLinuxAIXdi-buildindex.sh -instance instance -masterCatalogId masterCatalogId -dbuser wcs -dbuserpwd mypassword
    • WebSphere Commerce Developerdi-buildindex.bat -masterCatalogId masterCatalogId
  4. Verify that the index is populated with the warranty data successfully by navigating to the following URL:
    • WebSphere Commerce Developerhttp://localhost/solr/MC_masterCatalogId_CatalogEntry_en_US/select?q=*:*
    • SolarisLinuxAIXWindowshttp://host_name:solr-port/solr/masterCatalogId_CatalogEntry_en_US/select?q=*:*

    The URL returns all the results from the index directly. Ensure that ratings fields are also displayed in the results for the products that had ratings data in the database schema table.

    The verification results might resemble the following snippet, with the relevant element in bold:
    
    <?xml version="1.0" encoding="UTF-8" ?>
    - <response>
    - <lst name="responseHeader">
    <int name="status">0</int>
    <int name="QTime">73</int>
    - <lst name="params">
    <str name="q">MW-0113</str>
    </lst>
    </lst>
    - <result name="response" numFound="5" start="0">
    - <doc>
    <int name="buyable">1</int>
    - <arr name="catalog_id">
    <long>10001</long>
    </arr>
    <long name="catentry_id">10308</long>
    <str name="catenttype_id_ntk_cs">ProductBean</str>
    <float name="customerRanking_display">8.6</float>
    <str name="fullImage">images/catalog/apparel/apparel_160x160/IMG_0113_e.jpg</str>
    <long name="member_id">7000000000000000002</long>
    <str name="mfName">MapleWear</str>
    <str name="mfName_ntk">MapleWear</str>
    <str name="mfName_ntk_cs">MapleWear</str>
    <str name="name">Fashion henley</str>
    - <arr name="parentCatgroup_id_facet">
    <str>10001_10031</str>
    </arr>
    - <arr name="parentCatgroup_id_search">
    <str>10001_10031</str>
    <str>10001_10029</str>
    </arr>
    <str name="partNumber_ntk">MW-0113</str>
    <float name="price_USD">12.99</float>
    <int name="published">1</int>
    <str name="shortDescription">A sparkling look in comfy combed cotton.</str>
    <int name="storeent_id">10001</int>
    <str name="thumbnail">images/catalog/apparel/apparel_70x70/IMG_0113_e.jpg</str>
    </doc>
    

Results