Sunday 24 May 2015

Delete Record Store For An Endeca Application

In the process of removing an Endeca application we also need to remove related CAS record stores.

Here is the script that will help.

Save this as bat file then invoke from control folder of application you are removing.

==================================================================
setlocal

set CONTROL_DIR=%~dp0

call %CONTROL_DIR%\..\config\script\set_environment.bat
if not %ERRORLEVEL%==0 (
    echo Failed to set script environment.
    exit /B 1
)

set RS_PREFIX=%ENDECA_PROJECT_NAME%
set RS_LANG=%LANGUAGE_ID%

echo These record stores exist:
call %CAS_ROOT%\bin\component-manager-cmd.bat list-components
echo ==================================================

echo Dropping record stores (errors will occur on non-existent rs):
call %CAS_ROOT%\bin\component-manager-cmd.bat delete-component -n %RS_PREFIX%_%RS_LANG%_schema
call %CAS_ROOT%\bin\component-manager-cmd.bat delete-component -n %RS_PREFIX%_%RS_LANG%_dimvals
call %CAS_ROOT%\bin\component-manager-cmd.bat delete-component -n %RS_PREFIX%_%RS_LANG%_prules
call %CAS_ROOT%\bin\component-manager-cmd.bat delete-component -n %RS_PREFIX%_%RS_LANG%_data
echo ==================================================

echo Record stores deleted:
==================================================================

You can also create this script from initialize_rs_feeds.bat (located in conttrol folder). Remove content in this file after 

echo Creating fresh record stores.

Here is the output.In this case file is saved as Record_Store_Drop.bat and invoked from Store application.



Saturday 23 May 2015

Resolved Error : Search interface "All" contains a nonexistent member "product.repositoryId"

While importing CRS endeca studio project (CRS.esp) file into Endeca Developer Studio it was throwing error.

Error : Search interface "All" contains a nonexistent member "product.repositoryId".


After analyzing I found that product.repositoryId was missing from CRS.prop_refs.xml.

Manually adding below entry in this file resolved this issue.

<PROP_REF NAME="product.repositoryId" TYPE="ALPHA"/>


Sunday 17 May 2015

Repository Cached Items are no more puzzle


While analyzing cache behaviour for our application. I came to know one more interesting thing related to repository cache. That is to print the content of item-cache.



The <dump-caches> tag can be used to print out the contents of the item cache for one or more item descriptors.

There are two attributes in this tag.
  
   1. dump-type It takes  one of the values from below set.
         - debug : To display  cache items.
         - queries : Creates a log entry consisting of the <load-items> tag that is used to reload the cache.
         - both : Combines the output of debug and queries.
   2. item-descriptors  A comma-separated list of one or more item descriptor names. If no item descriptors are specified, all item descriptor caches are exported.
 

Wednesday 13 May 2015

ATG Repository Item Cache Interesting


While analyzing repository item cache related issues. I found interesting point about item cache size configuration in the case of item descriptor inheritance. 

Link :
http://docs.oracle.com/cd/E26180_01/Platform.94/RepositoryGuide/html/s1010cacheconfiguration01.html

How item cache size works : It is the maximum number of items of this type to store in the item cache. When this maximum is exceeded, the oldest items are removed from the cache.

Here is the fact : Within an inheritance tree, the last-read item descriptor’s item-cache-size setting applies to all item descriptors within the inheritance tree. In order to ensure the desired item cache size, be sure to assign the same item-cache-size to all related item descriptors 

Default Item Cache Value : 1000