Setting up the search index
The Search index is set up automatically during Search server startup. Search cores are created according to the configuration settings defined in the SRCHCONF and SRCHCONFEXT database tables. You can customize these tables to control the creation of search index cores.
Each item in SRCHCONFEXT can create a search index core.
Enter a mastercatalogId in the "INDEXSCOPE" column of SRCHCONFEXT and SRCHCONF for each master catalog you want to set up in the Search index.
About this task
The Product Ranking index is used to demonstrate the steps that are needed to extend the catalog entry base index schema for master catalog ID 10001 in the HCL Commerce development environment. The index type is CatalogEntry. The new index subtype is Ranking, and the new index core name is "MC_10001_CatalogEntry_Ranking_generic".
Procedure
-
Create the extension index in the Solr server.
-
Register the extension index core in the SRCHCONFEXT table.
Where:INSERT INTO srchconfext (srchconfext_id,indextype,indexscope,indexsubtype,config) VALUES(-100,'CatalogEntry','10001','Ranking','');
- INDEXTYPE
- Default valid values are the following. If you want to add an extended index core, INDEXSUBTYPE
should be your customized definition.
- CatalogEntry
- Sets up the index for catalog entries in the master catalog.
- CatalogGroup
- Sets up the index for categories in the master catalog.
- INDEXSCOPE
- The scope of the indexed data. For example, if the scope is the master catalog, enter the master catalog ID here.
- LANGUAGE_ID
- Indicates which language to use for the corresponding subtype search index
core.Note: "LANGUAGE_ID" must be null for Inventory or Price. It must also be null for custom search index cores ('extension' cores).
- INDEXSUBTYPE
- Indicates which subtype is set for search index core. The default valid values are:
- Structured
- Sets up the index for structured content.
- Unstructured
- Sets up the index for unstructured content.
- WebContent
- Sets up the index for site content.
- Inventory
- Sets up the index for inventory data.
- Price
- Sets up the external index core for price data.
- CONFIG
- Indicates extra configurations for a specified Search index core. For example, you can set BasePath and StoreId for the subtype WebContent index core. BasePath indicates the crawled site content path, and StoreId indicates the store into which to build the index. Separate different configurations by commas. For example:
BasePath=W:\IBM\WebSphere\Liberty\usr\servers\searchServer\resources\search\index\crawler\cache\2017-11-01\1\,StoreId=10501
- Restart the test server.
-
Verify the extension index at the following URL:
The response will resemble the following snippet:http://localhost/solr/MC_10001_CatalogEntry_Ranking_generic/select?q=*:*
<?xml version="1.0" encoding="UTF-8"?> <response> <lst name="responseHeader"> <int name="status">0</int> <int name="QTime">62</int> <lst name="params"> <str name="q">*:*</str> </lst> </lst> <result name="response" start="0" numFound="0"/> </response>