Fraska Portal

Exploring the WebSphere Commerce world

Francesco Schettini

Francesco Schettini

Freelance e-Commerce Solution Architect focused on web development projects using technologies like WebSphere, SOLR, JEE and Eclipse RCP.

contacts:
blog: fschettini.com
linkedIn: es.linkedin.com/in/fschettini

Posted by on in Administration
WebSphere Commerce, the SOLR extension index

One of the things I like most about the last enhancements- maybe introduced with FEP6, not sure of that- is the possibility to create an extension of the SOLR index. An extension index is, in a nutshell, an index which complements the data provided by the base index. A enlightening explanation is reported in the following IC page: Extending the WebSphere Commerce search base index schema.

According to the Info Center: "... dynamic information such as product inventory or ratings change more frequently. Therefore, it is put into a separate index, where it can be refreshed at different intervals than the base product index". That's awesome and it looks exactly the basic idea under the concept of Inventory Index (introduced with FEP6).

b2ap3_thumbnail_IC_SOLR_extension_index.png

Above is an extraction of the image reported in the IC page already mentioned before.

Using this feature we can finally think to implement re-index strategies with high frequency, pretty useful for dynamic data. The basic bricks used by the WCS team to build up this new feature are- according to my investigation- a custom Search Component (SolrSearchMultipleQueryComponent) and the possibility to make Join between different indexes.

That combination gives to the WCS implementation of SOLR an added value makes the SOLR native Join feature transparent to the developers. Let's review the main things ...

WebSphere Commerce, FEP7, Toolkit, Deploy SOLR Admin UI

The SOLR Admin UI is an interesting tool for monitoring the created cores, reviewing their configuration, querying them, understandng the cache performances, collecting useful troubleshooting information and many other things.

Having this tool in the hands of a System Admin could be really worth it. The UI is the following one:

WCS_SOLR_UI.png

The WCS InfoCenter describes the steps to follow in order to integrate the admin UI files in the solr-search web app: Info Center, Search performance tuning, Performance monitoring

However, it seems to have a couple of inaccuracies. So, I decided to report my experience deploying the SOLR Admin UI on FEP7 toolkit.

WebSphere Commerce, Review of the Search Navigation Flow

This time I prefer report this fundamental topic just with a schema I draw looking at the following IC pages:

It's the combination of the above documents; the following schema remarks the different interaction WCS runs in order to get Catalog information from SOLR.

I hope you can enjoy!

 

FIRST PART: from Request to Search Expression

SearchRequest_flow_1_20140708-081219_1.png

 

 

SECOND PART: from Expression to Search Response

SearchRequest_flow_2.png

THIRD PART: from Search Response to BOD noun

SearchRequest_flow_3.png

 

 

 

WebSphere Commerce, FEP7, Toolkit, foundation enablement and Search REST services

 Working with the Aurora starter store- provided with the FEP7- could bring some misconfiguration, in particular on the Developer version, lead to "break" the front-end, like in this case:

b2ap3_thumbnail_WCS_FEP7_Toolkit_REST_1.png

 

The above screenshot reports just the top part of the front page were is visible an issue rendering the menu. Looking at the log, an exception gets a glimpse on the possible reason:

 
[5/7/14 16:47:12:451 CEST] 00000148 LoggingHelper E /GenericJSPPageError.jsp - java.io.FileNotFoundException: http://myserverhostname:80/search/resources/store/11451/categoryview/@top?catalogId=10401&depthAndLimit=11%2C11&responseFormat=json&responseFormat=json&langId=-1
                                 java.lang.RuntimeException: java.io.FileNotFoundException: http://myserverhostname:80/search/resources/store/11451/categoryview/@top?catalogId=10401&depthAndLimit=11%2C11&responseFormat=json&responseFormat=json&langId=-1
	at com.ibm.commerce.foundation.internal.client.util.RESTHandler.execute(RESTHandler.java:122)
	...
	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1656)
Caused by: java.io.FileNotFoundException: http://myserverhostname:80/search/resources/store/11451/categoryview/@top?catalogId=10401&depthAndLimit=11%2C11&responseFormat=json&responseFormat=json&langId=-1
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	...com.ibm.commerce.foundation.internal.client.util.RESTUtil.getWithMultiValuedParams(RESTUtil.java:172)
	at com.ibm.commerce.foundation.internal.client.util.RESTHandler.execute(RESTHandler.java:116)
	... 103 more
Caused by: java.io.FileNotFoundException: http://myserverhostname:80/search/resources/store/11451/categoryview/@top?catalogId=10401&depthAndLimit=11%2C11&responseFormat=json&responseFormat=json&langId=-1
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1457)
	at com.ibm.commerce.foundation.internal.client.util.RESTUtil.getWithMultiValuedParams(RESTUtil.java:136)
	... 104 more
WebSphere Commerce, FEP 7, SOLR index pre-process error

Once the FEP7 installation is done and the starter store is published with some example data, the next step is the SOLR index configuration (setupSearchIndex), pre-process (di-preprocess) and build (di-buildindex).

However, during the pre-process step I faced an interesting exception. In fact, running the following command

di-preprocess.bat <WC_installfolder>\search\pre-processConfig\MC_<catalogId>\DB2

the process ended with the exception:

SEVERE: Exception message: CWFDIH0001: Data Import encountered a generic error. The error is null. , stack trace: com.ibm.commerce.foundation.dataimport.exception.DataImportSystemException: CWFDIH0001: Data Import encountered a generic error. The error is null. 
	at com.ibm.commerce.foundation.dataimport.preprocess.DataImportPreProcessorMain.processDataConfig(DataImportPreProcessorMain.java:957)
	at com.ibm.commerce.foundation.dataimport.preprocess.DataImportPreProcessorMain.execute(DataImportPreProcessorMain.java:802)
	at com.ibm.commerce.foundation.dataimport.preprocess.DataImportPreProcessorMain.main(DataImportPreProcessorMain.java:289)
Caused by: java.lang.NullPointerException
	at com.ibm.commerce.foundation.dataimport.preprocess.StaticAttributeDataPreProcessor.process(StaticAttributeDataPreProcessor.java:299)
	at com.ibm.commerce.foundation.dataimport.preprocess.DataImportPreProcessorMain.processDataConfig(DataImportPreProcessorMain.java:919)
	... 2 more

Most Popular Post

WebSphere Commerce, the SOLR extension index
Administration
Rate this blog entry:
4
WebSphere Commerce, Data Load and SOLR Delta Index
Data Load
Rate this blog entry:
0
WebSphere Commerce, the curious life of a front-end catalog request
Core
Rate this blog entry:
5

Latest Blogs

WebSphere Commerce, CommandLevelAuthorizationCache
Cache
Rate this blog entry:
0
WebSphere Commerce v8, toolkit exception, ClassNotFound db2
Administration
Rate this blog entry:
1
WebSphere Commerce, ATP migration
Store
Rate this blog entry:
0
WebSphere Commerce, the curious life of a front-end catalog request
Core
Rate this blog entry:
5
WebSphere Commerce, Performance analysis of few European stores
Performance
Rate this blog entry:
0