Debugging WebSphere Commerce Search
You can debug WebSphere Commerce Search by directly accessing Solr functions by using a web browser, without using WebSphere Commerce run time or utilities.
Before you begin
Procedure
-
Querying Solr in a web browser:
Go to the basic query URL: http://host_name:port/solr/core_name/select?q=field_name:search_keyword
- Search for all
documents
http://www.mycompany.com:3737/solr/MC_10001_CatalogEntry_en_US/select?q=*:*
- Search for all documents with a catentry_id of
1000
http://www.mycompany.com:3737/solr/MC_10001_CatalogEntry_en_US/select?q=catentry_id:10001
For more information, see Querying Data
- Search for all
documents
-
Build the search index with the Data import Handler (DIH) in a web browser. Go to the basic DIH
URL:
http://host_name:port/solr/core_name/dataimport?command=DIH_options
- Check DIH
status
http://www.mycompany.com:3737/solr/MC_10001_CatalogEntry_en_US/dataimport
- Run DIH (full
import)
http://www.mycompany.com:3737/solr/MC_10001_CatalogEntry_en_US/dataimport?command=full-import
- Run DIH (delta
import)
http://www.mycompany.com:3737/solr/MC_10001_CatalogEntry_en_US/dataimport?command=delta-import
For more information, see Data Import Request Handler.
- Check DIH
status
-
Administer search cores in a web browser:
Download the Solr Administration Console from Solr Downloads.
Then, go to the basic core administration URL: http://host_name:port/solr/admin/cores?action=action_option&core=core_name
- Check search core
status
http://www.mycompany.com:3737/solr/admin/cores?action=status&core=MC_10001_CatalogEntry_en_US
- Reload search core
configuration
http://www.mycompany.com:3737/solr/admin/cores?action=reload&core=MC_10001_CatalogEntry_en_US
It is recommended that you merge the admin subdirectory in the SOLR.war file that is downloaded from Apache Solr and merge it into the SOLR.war file that is on the WebSphere Commerce Search server.
For more information, see Core Admin.
- Check search core
status
-
Manually control replication by using the Solr replication enable and disable functions from
the master server.
- Disable replication on master for all
subordinates
http://master_server:3737/solr/MC_10001_CatalogEntry_en_US/replication?command=disablereplication
- Enable replication on master for all
subordinates
http://master_server:3737/solr/MC_10001_CatalogEntry_en_US/replication?command=enablereplication
For more information, see SolrReplication.
- Disable replication on master for all
subordinates
-
You can use Luke to debug the search index, as Luke can open up and inspect each record in the
search index. For more information, see Luke - Lucene Index Toolbox.
Tip: When the search server is restarted, you might encounter an error when you go to the storefront for the first time:
The error is due to the Solr server initial configuration, and can be resolved by reloading the store page in your web browser.The store has encountered a problem processing the last request...