This page describes how we can create custom SOLR cores in commerce. Let's think of a e commerce site where we retailers can log in and can register there shops. We want to index Shops so that user can search for different shops.
SOLR Core Naming Convention
A custom SOLR core has to be named according to OOTB convention MC_10001_<coreName>_en_US. The core name should be a single word without any underscores in it. An entry in solr.xml will look like as below
<
core
instanceDir
=
"MC_10001\en_US\Shops\"
name
=
"MC_10001_Shops_en_US"
/>
Registering custom core with Search server
Create a new folder along with the other SOLR cores, "Shops" at /search/solr/home/MC_10001/en_US/
- Shops should have a "conf" folder for configuration XMLs.
- Define SQL in /conf/wc-data-config.xml and map the database fields with SOLR fields.
- Define SOLR fields in schema.xml
We need to register our custom SOLR core with Search Server. A typical entry in
/Search/xml/config/com.ibm.commerce.catalog-ext/wc-search.xml will look like:
<
_config:core
catalog
=
"10001"
indexName
=
"Shops"
language
=
"en_US"
name
=
"MC_10001_Shops_en_US"
path
=
"/MC_10001/en_US/Shops"
serverName
=
"BasicConfiguration"
/>
At this time, if everything is setup properly, you should be able to hit the newly created SOLR core
http://localhost/solr/MC_10001_Shops_en_US/select?q=*:*
<
_config:core
catalog
=
"10001"
indexName
=
"Shops"
language
=
"en_US"
name
=
"MC_10001_Shops_en_US"
path
=
"/MC_10001/en_US/Shops"
serverName
=
"BasicConfiguration"
/>
Indexing data in custom Index
We can't use OOTB build index and preprocess utility to index data in custom core. These utilities are very much tied to Catalog entities.
For custom cores, our data should be index ready. We may need to define complex SQLs in wc-data-config.xml to get the data index ready as we can't use preprocessing here.
For Indexing, we can rely on DIH commands and can directly hit import URL to index the data as below:
http://localhost/solr/MC_10001_Shops_en_US/dataimport?command=full-import
Thanks for splitting your comprehension with us. It’s really useful to me & I hope it helps the people who in need of this vital information.
ReplyDeleteOnline DevOps Certification Course - Gangboard
Best Devops Training institute in Chennai
Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging.
ReplyDeleteData Science Training in Chennai | Best Data science Training in Chennai
Data Science training in kalyan nagar
Data science training in Bangalore | Data Science training institute in Bangalore
Data Science training in marathahalli | Data Science training in Bangalore
Data Science interview questions and answers
Data science training in jaya nagar | Data science Training in Bangalore
ReplyDeleteSome us know all relating to the compelling medium you present powerful steps on this blog and therefore strongly encourage
contribution from other ones on this subject while our own child is truly discovering a great deal.
Have fun with the remaining portion of the year.
Selenium training in bangalore | best selenium training in bangalore | advanced selenium training in bangalore
perde modelleri
ReplyDeletesms onay
Turkcell Mobil Ödeme Bozdurma
nft nasil alınır
ankara evden eve nakliyat
TRAFİK SİGORTASI
Dedektor
websitesi kurma
aşk kitapları