Introduced in Feature Pack 2

Debugging WebSphere Commerce search

You can debug WebSphere Commerce search by directly accessing Solr functionality using a Web browser, without using WebSphere Commerce runtime or utilities.

Before you begin

Procedure

  • Querying Solr using a Web browser:

    Navigate to the basic query URL: http://host_name:port/solr/core_name/select?q=field_name:search_keyword

    For example:

    • 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

  • Build the search index with the Data import Handler (DIH) using a Web browser. Navigate to the basic DIH URL: http://host_name:port/solr/core_name/dataimport?command=DIH_options

    For example:

    • 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.

  • Administer search cores using a Web browser:

    Download the Solr Administration Console from Solr Downloads.

    Then navigate to the basic core administration URL: http://host_name:port/solr/admin/cores?action=action_option&core=core_name

    For example:

    • 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 downloaded from Apache Solr and merge it into the SOLR.war file located on the WebSphere Commerce search server.

    For more information, see Core Admin.

  • Manually control replication by using the Solr replication enable and disable functions from the master server. For example:
    • 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.

  • 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 such as the following when browsing the storefront for the first time:
    The store has encountered a problem processing the last request...
    This is due to the Solr server completing its initial configuration, and can be resolved by reloading the store page in your web browser.