Tuesday, November 29, 2011

Solr Re-indexing steps WCS 7

Pre-requests: you need to have V7 FEP2+.

IBM WCS is now a fully operational search engine. the product now includes Lucene Solr as the interal search engine, also incorporates industry best practices.


Once you get the latest database, follow these steps to re-index the products.

  1. Install "WebSphere Commerce Developer Enterprise" version 7
  2. Update "WebSphere Commerce Developer Enterprise" to version 7.0.0.5
  3. Stop Server
  4. Enable the Store Enhancement Features
    1. cd WCDE_installdir\bin
    2. enableFeature.bat -DfeatureName=store-enhancements
  5. Publish the Madisons Feature Pack Store Archive:
    1. Publish Madisons-FEP.sar
  6. Enable the Solr foundation
    1. cd WCDE_installdir\bin
    2. enableFeature.bat -DfeatureName=foundation [DsolrHome=C:\IBM\WCDE_ENT70\search\solr\home]
  7. Setup the Search Index: (WC Server must be Stoped)
    1. cd 'WCDE_installdir'\components\foundation\subcomponents\search\bin
    2. setupSearchIndex.bat -masterCatalogId 10001 -instance WCDE_ENT70 -dbuser db2admin -dbuserpwd db2admin [-solrhome C:\IBM\WCDE_ENT70\search\solr\home]
    3. To see log file : \WCDE_ENT70\components\foundation\subcomponents\search\log\wc-search-index-setup.log
    4. Once successfully completed the status code could be : Program exiting with exit code: 0
  8. Preprocess the Search index: (Run the di-preprocess.bat file against the search index, again server stopped at this point)
    1. cd WCDE_installdir\bin
    2. di-preprocess.bat C:\IBM\WCDE_ENT70\search\pre-processConfig\MC_10001\DB2\ [-fullbuild true] [-localename en_US]
  9. Test the current Solr index to ensure that a request can be recognized: (Server should be started)
    1. http://host_name/solr/Default/select?q=*%3A*
  10. Build out the index (first make sure to start the WC server):
    1. cd WCDE_installdir\bin
    2. di-buildindex.bat -masterCatalogId 10001 
  11. Test the indexed Solr index to ensure results are returning:
    1. http://localhost/solr/MC_10001_CatalogEntry_en_US/select?q=catentry_id:10251
  12. Enable the store to display the search breadcrumb and faceting filters:
    1. Open Management Center
    2. Click "Management Center Tools" menu and select "Store Management"
    3. Select the "Madisons" store and click the "Catalog" tab
    4. check "Search-based navigation"
    5. click Save
  13. Test live on the starter store:
    1. http://localhost/webapp/wcs/stores/servlet/Madisons/index.jsp
    2. http://localhost/webapp/wcs/stores/servlet/en/eliteesite/home

Tuesday, November 22, 2011

Deleting order items and requisition lists

When a user deletes an order item or requisition list item the table rows representing those items are removed from the database. If enabled, these rows are updated to belong to the trashcan. You can clear the trashcan by running the OrderTrashCanClear scheduled job which will delete the rows, or by using the Database Clean up utility. This feature is disabled by default.

It is highly recommended that you clean your database of order items both before you enable the OrderTrashCan feature, and periodically afterwards. Order item deletion is a common operation, and as a result, a large number of deleted order items can build up in the ORDERITEMS table.

1. Open wc-sever.xml configuration file
2. Within the file, the text can be put next to "ExpectedInventorySynchronize" element.


TrashCanRequisitionListSegmentLen="30"
TrashCanOrderItemSegmentLen="50"
TrashCanEnabled="true"/>

This setting deletes order item entries from the ORDERITEMS table. If TrashCanEnabled is set to "true", when a user deletes an order item or requisition list item, the table rows representing those items are not deleted from the database. Instead, the items are updated to belong to the trashcan.

Monday, November 21, 2011

Disable Access Control Policy WCS (Developent)

Developer while creating new Views commands controllers is to define the access control policy, Although it is a must have step for security reasons, I have always wondered why we need to do this during development time, Just to test and views without having to create the policies during development. Well yes, It's possible with a simple configuration.

In toolkit, navigate to your instance.xml file, on WCS 7 , this will be typically located in
D:\IBM\WCDE_ENT70\workspace\WC\xml\config\wc-server.xml



In toolkit, navigate to your instance.xml file, on WCS 7 , this will be typically located in
D:\IBM\WCDE_ENT70\workspace\WC\xml\config\wc-server.xml

you have to find xml elemented named "Instance

AccessControlUnitTest="true"

and place above attribute with value immediately after "Instance" Elements

Save and restart your test server, from now on any controller and view command that you create will not require a acppolicy to be loaded.

Monday, November 14, 2011

Configuring tracing and logging for the loading utilities

you can configure an additional message log file, messages.txt, and a trace file, traces.txt, for the loading utilities. This can be helpful in getting more information to help determine any problems you may encounter.

1. Open the following in a text editor:

WC_installdir/xml/loader/WCALoggerConfig.xml

Note: There are two locations of the WCALoggerConfig.xml file. WCDE_installdir/xml/loader/WCALoggerConfig.xml is used by the loader utilities when run from the command line, and the file WC_installdir/instances/ instance_name/xml/loader/WCALoggerConfig.xml is used by the loader utilities in the server context, for example during the store publish process.


The component tags define the components for which trace is enabled.

Friday, November 11, 2011

How to find version of fix pack of WAS?

1. Go to WAS_installer\runtimes\base_v7\bin>versionInfo.bat

output:

WVER0010I: Copyright (c) IBM Corporation 2002, 2005, 2008; All rights reserved.
WVER0012I: VersionInfo reporter version 1.15.1.26, dated 8/9/08

--------------------------------------------------------------------------------
IBM WebSphere Application Server Product Installation Status Report
--------------------------------------------------------------------------------

Report at date and time November 11, 2011 5:39:01 PM IST

Installation
--------------------------------------------------------------------------------
Product Directory C:\Program Files\IBM\SDP\runtimes\base_v7
Version Directory C:\Program Files\IBM\SDP\runtimes\base_v7\properties\version
DTD Directory C:\Program Files\IBM\SDP\runtimes\base_v7\properties\version\dtd
Log Directory C:\Program Files\IBM\SDP\runtimes\base_v7\logs
Backup Directory C:\Program Files\IBM\SDP\runtimes\base_v7\properties\version\nif\backup
TMP Directory C:\DOCUME~1\SETTU~1.GOP\LOCALS~1\Temp

Product List
--------------------------------------------------------------------------------
BASE installed

Installed Product
--------------------------------------------------------------------------------
Name IBM WebSphere Application Server
Version 7.0.0.13
ID BASE
Build Level cf131039.07
Build Date 10/2/10
Architecture Intel (32 bit)

--------------------------------------------------------------------------------
End Installation Status Report
--------------------------------------------------------------------------------