Building the search index
In this lesson, you build the full search index to include the completed fields and the
extraction mappings.
Procedure
- Start the WebSphere Commerce Test Server.
- In a command-line utility, go to the WCDE_installdir\bin directory.
-
Run the following command to run the index building utility for the custom data.
- di-buildindex.bat -masterCatalogId masterCatalogId
-
Verify that the index is populated successfully by entering the following URL in a web
browser.
- http://localhost/solr/MC_masterCatalogID_CatalogEntry_en_US/select?q=*:*
The URL returns all of the results from the index directly. Ensure that theprofitMargin
fields display in the results for products.Note:The verification results might resemble the following code snippet. The relevant elements are in bold.profitMargin
is the example index field name that is used in this tutorial. Ensure that the same index field name that you defined when you updated your search x-schema.xml file display in the results for the products.<?xml version="1.0" encoding="UTF-8"?> <response> <lst name="responseHeader"> <int name="status">0</int> <int name="QTime">0</int> <lst name="params"> <str name="q">*:*</str> </lst> </lst> <result name="response" start="0" numFound="3918"> <doc> <int name="storeent_id">10051</int> <int name="buyable">1</int> <float name="listprice_USD">250.0</float> <str name="seo_token_ntk">hermitage-fit-and-flare-dress</str> <str name="thumbnail">images/catalog/apparel/women/wcl000_dresses/200x310/wcl000_0028_a_red.jpg</str> <int name="published">1</int> <str name="name">Hermitage Fit and Flare Dress </str> <arr name="term_suggest"> <str>Hermitage Fit and Flare Dress </str> <str>Jewel-toned cocktail dress with fitted bodice and gently flared skirt</str> </arr> <str name="shortDescription">Jewel-toned cocktail dress with fitted bodice and gently flared skirt</str> <str name="subscripType">NONE </str> <long name="member_id">7000000000000000101</long> <str name="longDescription">Classically tailored, this elegant satin dress features a bateau neckline, soft pleating, and a clasped belt to define the waist.</str> <arr name="parentCatgroup_id_search"> <str>10001_10006</str> <str>10001_10001</str> <str>10001_10003</str> <str>10052_10006</str> <str>10052_10001</str> <str>10052_10003</str> </arr> <str name="catentry_id">10001</str> <float name="price_USD">100.0</float> <str name="partNumber_ntk">AuroraWMDRS-1</str> <int name="disallowRecOrder">1</int> <str name="fullImage">images/catalog/apparel/women/wcl000_dresses/646x1000/wcl000_0028_a_red.jpg</str> <arr name="parentCatgroup_id_facet"> <str>10001_10006</str> <str>10052_10006</str> </arr> <str name="catenttype_id_ntk_cs">ProductBean </str> <arr name="ad_attribute"> <str>7000000000000000006/_/occasion/_/Occasion/_/1.00000/_/7000000000000000037/_/Cocktail & Evening/_/Cocktail & Evening/_/25.00000/_/1/_/0/_/1/_/0/_/0/_/2/_/0/_/-/_/one/_/C62</str> <str>7000000000000000005/_/material/_/Material/_/1.00000/_/7000000000000000030/_/Synthetic/_/ Synthetic/_/21.00000/_/1/_/0/_/1/_/0/_/0/_/2/_/0/_/-/_/one/_/C62</str> <str>7000000000000000004/_/length/_/Length/_/1.00000/_/7000000000000000027/_/Short/_/Short/_/ 20.00000/_/1/_/0/_/1/_/0/_/0/_/2/_/0/_/-/_/one/_/C62</str> <str>7000000000000000003/_/construction/_/Construction/_/1.00000/_/7000000000000000025/_/Knit/_/ Knit/_/19.00000/_/1/_/0/_/1/_/0/_/0/_/2/_/0/_/-/_/one/_/C62</str> <str>7000000000000000002/_/swatchcolor/_/Color/_/1.00000/_/0/_/0/_/0/_/0.00000/_/1/_/0/_/1/_/0/_/ 0/_/1/_/0/_/-/_/0/_/0</str> <str>7000000000000000001/_/swatchSize/_/Available Sizes/_/2.00000/_/0/_/0/_/0/_/0.00000/_/1/_/ 0/_/1/_/0/_/0/_/1/_/0/_/-/_/0/_/0</str> </arr>
<float name="profitMargin">44.0</float>
<arr name="sequence"> <str>10001_10006_1.00000</str> <str>10052_10006_1.00000</str> </arr> <str name="mfName">Hermitage Collection</str> <str name="mfName_ntk_cs">Hermitage Collection</str> <str name="mfName_ntk">Hermitage Collection</str> <arr name="catalog_id"> <long>10001</long> <long>10052</long> </arr> <date name="indexedTime">2015-11-24T18:44:51.291Z</date> </doc> ... </result> </response>