Wednesday, April 27, 2016

How to Migrate Endeca Application between environment for forge-based Indexing?

As part of the development/debugging phase, Endeca Application needs to be migrated from QA to UAT or Production to Staging. Following it... thumbnail 1 summary
  • As part of the development/debugging phase, Endeca Application needs to be migrated from QA to UAT or Production to Staging.

    Following items need to be migrated between environments. Find out the description below for each item.

    • Workbench content - Business creates content using Endeca Experience manager and gets stored in IFCR(InFront Configuration Repository)
    • State File - State file contains Endeca auto generated dimension values and FCM generated dimension value. Endeca N-value can be different if state files do not get copied to the environment.
    • Endeca Pipeline -  This Folder contains Endeca Application indexing configuration XML including properties, dimensions, search etc.
    • Cartridge Templates -  This folder contains all cartridge templates that is used to create content in Experience Manager.
    • Editors Config - This Folder contains configuration file to make a call to MDEX to show appropriate data in Experience manager cartridges.
    • Record Store Record store contains all indexable records(Product catalog, content, record store etc.) and dimension information.

    Endeca Dimension Cartridge Editors
    Cartridge Editors


    As part of the migration process, the application needs to be exported first and the same set of files can be used to import into another environment.

    Export Endeca Application steps 

    1. Record Store - Click here to get more details. This Step can be optional if baseline triggers using /atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin Component

    2. State files - Copy <<Endeca_App>>/data/state folder.


    3. Endeca Pipeline - Copy <<Endeca_App>>/config/pipeline folder

    4. Cartridge Templates - Copy <<Endeca_App>>/config/cartridge_templates folder.

    5. Editors Config - Copy <<Endeca_App>>/config/editors_config folder

    6. Workbench ContentNavigate To Endeca Application control folder and run following commands to get export 
           <<Endeca_App>>/control->export_site.[bat|sh]
          This would generate the XML file and take the backup
    Endeca Export Site



    Import Endeca Application steps - Steps should be in the following order.

    1. Record Store Click here to get more details. This Step can be optional if baseline triggers using /atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin Component.

    2. State files - Take the backup of <<Endeca_App>>/data/state folder and move state files copied from step-2  during export.

    3. Endeca Pipeline - Take the backup of <<Endeca_App>>/config/pipeline folder and move pipeline files copied from step-3  during export.

    4. Cartridge Templates - Copy cartridge_templates  from step 4 and run the following command to apply to Workbench. 
            <<Endeca_App>>/control -> set_templates.[bat|sh]
    Endeca Set Template command

    5. Editors Config - Copy editors_config from step 5 and change host and post information based on environment under each json file and run the following command
             <<Endeca_App>>/control -> set_editors_config.[bat|sh]

    6. Endeca Baseline Update-  Run below Command

          <<Endeca_App>>/control -> ./baseline_update.[bat|sh]

    7. Workbench Content - Import generated XML from Step-6 (Import site) to the Workbench content u. Run the following command to  import XM content
            <<Endeca_App>>/control -> ./import_site.[bat|sh]<<File_Name>>

    Endeca Import Site command


    8. Promote Content - Run the following command to promote content from Authoring to Live. Promote content can be run the Workbench as well.
           <<Endeca_App>>/control -> ./promote_content.[bat|sh]

    Endeca Promote Content


    From Author

    Was this post resolve the solution you are looking for? are you looking for some other issues?Provide your comments

    Tuesday, April 26, 2016

    Endeca 11.2 : Workbench login credentials are not found or found invalid credential type for key

    Behaviour :- Following Exception/Error comes during Endeca Application initialize services or baseline/partial indexing process. [04.2... thumbnail 1 summary
  • Behaviour :-

    Following Exception/Error comes during Endeca Application initialize services or baseline/partial indexing process.


    [04.20.16 22:46:52] INFO: Provisioning site from prototype...
    [04.20.16 22:46:54] SEVERE: Workbench login credentials are not found or found invalid credential type for key <ifcr> and mapName <endecaToolsAndFrameworks>. Please update using <ENDECA_TOOLS_ROOT>/credential_store/bin/manage_credentials script with '--type password' as argument. Please refer to script usage.
    [04.20.16 22:46:54] SEVERE: Failed to initialize IFCRUtility.
    Occurred while executing line 3 of valid BeanShell script:
    [[
    1|
    2|    
    3|    IFCR.provisionSite();
    4|    CAS.importDimensionValueIdMappings("Discover-dimension-value-id-manager",
    5|         InitialSetup.getWorkingDir() + "/test_data/initial_dval_id_mappings.csv");
    6|    
    ]]

    [04.20.16 22:46:54] SEVERE: Caught an exception while invoking method 'run' on object 'InitialSetup'. Releasing locks.

    Caused by java.lang.reflect.InvocationTargetException
    sun.reflect.NativeMethodAccessorImpl invoke0 - null
    Caused by com.endeca.soleng.eac.toolkit.exception.AppControlException
    com.endeca.soleng.eac.toolkit.script.Script runBeanShellScript - Error executing valid BeanShell script.
    Caused by com.endeca.soleng.eac.toolkit.exception.AppConfigurationException
    com.endeca.soleng.eac.toolkit.component.IFCRComponent initIFCR - Failed to initialize IFCRUtility.


    Solution :-
    Above Exception comes as Endeca workbench password does not match with csfManager defined in WorkbenchConfig.xml. This happens if Endeca workbench password changed from change password screen and the same password not updated manually in CSF/OCS repository.


    Change Password using Endeca Workbench

    Find out command below to update Endeca CSF/OCS repository :-

    Run the command manage_credentials.bat add --user admin --key ifcr under <<ToolsAndFrameworks_PATH>>/<<version>>/credential_store.
     - Update the password with workbench password.
     - When it prompts to overwrite, type yes.


    From Author

    Was this post resolve the solution you are looking for? are you looking for some other issues?Provide your comments

    Monday, April 25, 2016

    Endeca 11.x : How to Add manipulator using CAS?

    Oracle Endeca 11.1 onwards forge less approach is used to index. Most of the data manipulation is done at the source level. Java Manipulator... thumbnail 1 summary
  • Oracle Endeca 11.1 onwards forge less approach is used to index. Most of the data manipulation is done at the source level. Java Manipulators required if some data manipulation required at CAS level.

    Find out the list of steps to create manipulator, deploy into CAS and use in the Endeca project.
    • Create a Manipulator similar to as per sample provided by Oracle endeca. Sample can be found under <installpath>\CAS\version\sample\cas-extensions\src\main\com\endeca\cas\extension\sample\manipulator\substring.
    • Create a jar file for classes created for the custom manipulator. Sample example gives ant script to create a jar file.
    • Stop CAS service. Create a new folder under “<Installpath>\CAS\version\lib\cas-server-plugins. Place newly created jar and dependent jar to support manipulators under the newly created directory.
    • Start CAS services. Newly created manipulator would be registered in CAS service. To verify, run below command to see if CAS has registered newly created manipulators or not :-
      • <Installpath>\CAS\11.1.0\bin>cas-cmd.sh listModules
    • Update “<Endeca App Path>\CRS\config\cas\last-mile-crawl.xml” file to inject newly created manipulator to manipulate the data. Sample file attached
    Manipulator Entry in Last-mile-crawl

    • Run the following command to update configuration in CAS 
      • <Installpath>\CAS\11.1.0\bin >./cas-cmd.sh updateCrawls -f <Endeca App Path>\CRS\config\cas\last-mile-crawl.xml
    • As per above example file, a “targetProperty” has created as “product.description123”. Mapping needs to be added for newly created property to Endeca indexing.
    • Add mapping in “<Endeca App path>\CRS\config\index_config\index-config.json”. find out the screenshot below
    New attribute added in index-config.json

    • Run the following command to update configuration in Endeca configuration repository(ECR).
      • <Endeca App Path>\CRS\control>./index_config_cmd.shset-config -f ..\config\index_config\index-config.json -o all
    • Run baseline indexing process using App/control/./baseline_update.sh. Changes should be visible in endeca_jspref after indexing is done. 
    Note :- Java Manipulators must be thread-safe. The CAS Server will invoke methods on this class from multiple-threads and potentially concurrently. 



    From Author

    Was this post resolve the solution you are looking for? are you looking for some other issues?Provide your comments

    Oracle Endeca 11.x - How to Add multiple record store using Endeca CAS ?

    Oracle Endeca has introduced forge less baseline indexing approach to index the data to MDEX engine. In this process, CAS generates the MDE... thumbnail 1 summary
  • Oracle Endeca has introduced forge less baseline indexing approach to index the data to MDEX engine. In this process, CAS generates the MDEX compatible data.

    Suppose there are requirements to add "content" from third-party and these data are different from products. In this case, another record store required for the new data source.

    Each Record under new record store should have "record.id" attribute. Endeca CAS uses record.id to make a switch join between multiple record store. The record would not be indexed if record.id is not available for any record.

    Find out steps below to add multiple Record store :-

    1. Create a new record store - Navigate to CAS/bin folder and run ./component-manager-cmd.sh create-component -t RecordStore -n CRS_content.

    2. Write data into record store using either CAS JAVA API or using XML file.

    3. Add Record store entry in last-mile-crawl.xml. This file can find out under <<Endeca App>>/config/cas folder.



    4. Run following command to update configuration in CAS 
     \CAS\11.1.0\bin >cas-cmd.bat updateCrawls -f <Endeca_App_Path>\config\cas\last-mile-crawl.xml

    5. Run baseline indexing process.


    From Author

    Was this post resolve the solution you are looking for? are you looking for some other issues?Provide your comments

    Sunday, April 24, 2016

    Endeca 11.2 : Unauthorized (401): Unauthorized access to workbench

    Behaviour :- Following Exception/Error comes during Endeca Application initialize services or baseline/partial indexing process. ... thumbnail 1 summary
  • Behaviour :-

    Following Exception/Error comes during Endeca Application initialize services or baseline/partial indexing process.


    <[04.20.16 22:55:48] SEVERE: Unauthorized (401): Unauthorized access to workbench. Please check your credentials in WorkbenchConfig.xml/OCS. If problem still persists, please contact your administrator.
    Occurred while executing line 3 of valid BeanShell script: 
    [[

    1|
    2|       
    3|    IFCR.provisionSite();
    4|    CAS.importDimensionValueIdMappings("Discover-dimension-value-id-manager", 
    5|         InitialSetup.getWorkingDir() + "/test_data/initial_dval_id_mappings.csv");
    6|      

    ]]

    [04.20.16 22:55:48] SEVERE: Caught an exception while invoking method 'run' on object 'InitialSetup'. Releasing locks.

    Caused by java.lang.reflect.InvocationTargetException
    sun.reflect.NativeMethodAccessorImpl invoke0 - null
    Caused by com.endeca.soleng.eac.toolkit.exception.AppControlException
    com.endeca.soleng.eac.toolkit.script.Script runBeanShellScript - Error executing valid BeanShell script.
    Caused by com.endeca.soleng.eac.toolkit.utility.IFCRUtility$HttpStatusException
    com.endeca.soleng.eac.toolkit.utility.IFCRUtility execute - Unauthorized (401): Unauthorized access to workbench. Please check your credentials in WorkbenchConfig.xml/OCS. If problem still persists, please contact your administrator.


    Solution :-
    Above Exception comes as Endeca workbench password does not match with csfManager defined in WorkbenchConfig.xml. This happens if Endeca ifcr password is different than workbench password.

    Find out command below to update Endeca CSF/OCS repository :-

    Run the command manage_credentials.bat add --user admin --key ifcr under <<ToolsAndFrameworks_PATH>>/<<version>>/credential_store/bin.
     - Update the password with workbench password.
     - When it prompts to overwrite, type yes.


    From Author

    Was this post resolve the solution you are looking for? are you looking for some other issues?Provide your comments

    How to enable property for record filtering in Endeca - CAS based Indexing?

    The Index Configuration modifies index configuration stored in the Endeca Configuration Repository for an application. index-config.json ... thumbnail 1 summary
  • The Index Configuration modifies index configuration stored in the Endeca Configuration Repository for an application.

    index-config.json contains all dimension and property definition including ATG configuration in ECR repository and used for indexing. This file can find out under <<Endeca_App>>/config/index-config folder. This file gets generated during application creation using deployment template.

    Find out following steps to make property records filterable :-

    1. Add a property in index-config.json under <<Endeca_App>>/config/index-config folder.

    2. Add "isRecordFilterable" property as true. Below example would update product.brand property.

    Add Record filterable using index-config.json

    3. Run the following command to update the property in Endeca Configuration repository.

    <<Endeca_APP_PATH>>/control->./index_config_cmd.sh set-config -o all|system -f <<File_Path>>/index-config.json.

    Note : - By default Index-config.json contains few properties and those are not used in CRS integration. Remove all properties and add the desired properties.

    CAS Based Indexing : What is Index-config.json

    The Index Configuration modifies index configuration stored in the Endeca Configuration Repository for an application. This utility is typic... thumbnail 1 summary
  • The Index Configuration modifies index configuration stored in the Endeca Configuration Repository for an application. This utility is typically used to modify data after it has been exported from a product catalog system and modify the search configuration settings for the data.

    The following configuration can be done using index-config.json:

    • Endecaproperties,derived properties,and dimensions.
    • Precedence rules. These are specified under the precedenceRules node.
    • Search configuration. These are specified under the searchIndexConfig node.
    This file can be find out under <<Endeca_App>>/config/index-config/index-config.json

    Find out schema definition below 


    endeca:property 
    • isEnabled
      • Optional. Indicates whether the property is processed by CAS when CAS writes MDEX-compatible output. A value of true includes the property during processing; false excludes the property. This setting is useful when troubleshooting data issues for specific attributes. If omitted, the default value is true.
    • isRecordFilterable
      • Optional. Indicates whether the property can be used to filter records. Record filtering presents a subset of the data to the end-user. If omitted, the default value is false.
    • isRecordSearchEnabled
      • Optional. Specifies whether or not record search should be enabled for this property. Record search finds all records in an Endeca application that are tagged with an Endeca property that matches a term the user provides. You must enable each property that you want available for the record search. If omitted, the default value is false.
    • isRollupKey
      • Optional. Indicates whether the property can be used as a rollup key. This allows aggregated records to be based on this Endeca property. If omitted, the default value is false
    • isWildcardEnabledInRecordSearch
      • Optional. Indicates whether wildcard search is enabled for this Endeca property
    • mergeAction - ADD, UPDATE
      • Optional. The mergeAction specifies how to merge the attribute into the index configuration
    • propertyDataTYpe - ALPHA, INTEGER, DOUBLE, GEOCODE, DATETIME, DURATION, TIME
      • If omitted, the default value of propertyDataType is ALPHA
    • sourcePropertyName (multi-valued)
    endeca:derivedProperty
    • derivedPropertyFunction - MIN, MAX, SUM, AVG
    • derivedPropertySource
    • isEnabled
    • mergeAction
    endeca:dimension
    • displayOrder 
    • isAutogen
    • isEnabled
    • isHierarchicalDimensionSearchEnabled
    • isHierarchicalRecordSearchEnabled
    • isRecordSearchEnabled
      • Optional. Specifies whether or not record search should be enabled for this dimension
    • isWildcardEnabledInRecordSearch
    • mergeAction
    • multiSelectType - NONE, OR, AND
      • Optional. The multiSelectType enumerates the valid values for specifying multi-select dimensions
    • rangeComparisonType - STRING, INTEGER, FLOAT
      • Optional. This is used to create a range dimension
    • sourcePropertyName



    endeca:precedenceRules

    • isEnabled
    • isLeafTrigger 
    • mergeAction 
    • triggerDimension 
      • Required. Specifies the trigger dimension for a precedence rule.
    • triggerDimensionValueSpec
    • targetDimension
      • Required. Specifies the target dimension for a precedence rule
    Precedence_Rules_Index-config.json


    How to apply to Endeca Application

    Updated json can be set into application using below command


    <<Endeca_APP_PATH>>/control->./index_config_cmd.sh set-config -o system -f <<File_Path>>/index-config.json


    From Author

    Was this post resolve the solution you are looking for?Provide your comments

    How to migrate CAS record store schema with data between environments?

    As per ATG-Endeca Integration, All product catalog data gets stored in Endeca CAS record store during baseline process. Sometimes, these da... thumbnail 1 summary
  • As per ATG-Endeca Integration, All product catalog data gets stored in Endeca CAS record store during baseline process. Sometimes, these data needs to be migrated from Production to UAT or UAT to Dev.

    Find out steps below to Migrate.

    Export Data from Environment - Production

    1. Identify record store names to be migrated.

    Navigate to CAS Installation directory and list the record stores
    /CAS/<<Version_number>>/bin->./component-manager-cmd.sh list-components
    CRS_en_dimvals
    CRS_en_data
    CRS_en_schema

    2. Identify if there are any active-transactions or not

    /CAS/<<Version_number>>/bin->
    ./recordstore-cmd.sh list-active-transactions -a CRS_en_dimvals
    ./recordstore-cmd.sh list-active-transactions -a CRS_en_data
    ./recordstore-cmd.sh list-active-transactions -a CRS_en_schema

    3. Fetch the current record store configuration

    /CAS/<<Version_number>>/bin->

    ./recordstore-cmd.sh get-configuration -a CRS_en_dimvals -f CRS_en_dimvals.xml
    ./recordstore-cmd.sh get-configuration -a CRS_en_data -f CRS_en_data.xml
    ./recordstore-cmd.sh get-configuration -a CRS_en_schema -f CRS_en_schema.xml

    4. Read data from record store and write into XML files

    /CAS/<<Version_number>>/bin-> 
    ./recordstore-cmd.sh read-baseline -a CRS_en_dimvals -f data_CRS_en_dimvals.xml
    ./recordstore-cmd.sh read-baseline -a CRS_en_schema -f data_CRS_en_schema.xml
    ./recordstore-cmd.sh read-baseline -a CRS_en_data -f data_CRS_en_data.xml



    Import Data with schema to enviornment -UAT

    1. Set the CAS record Store Configuration using step 3 during import process

    /CAS/<<Version_number>>/bin-> 
    recordstore-cmd.bat set-configuration -a CRS_en_dimvals -f CRS_en_dimvals.xml
    recordstore-cmd.bat set-configuration -a CRS_en_schema -f CRS_en_schema.xml
    recordstore-cmd.bat set-configuration -a CRS_en_data -f CRS_en_data.xml

    2. Use step 4 data and write record into record store 
    /CAS/<<Version_number>>/bin-> 
    recordstore-cmd.bat write -a CRS_en_dimvals -f data_CRS_en_dimvals.xml
    recordstore-cmd.bat write -a CRS_en_schema -f data_CRS_en_schema.xml
    recordstore-cmd.bat write -a CRS_en_data -f data_CRS_en_data.xml

    Note :- CRS_en_schema is not used for CAS based Indexing after 11.1 version.

    How to retain selected dimension under multi select dimension on front-end?

    Behaviour As per default behavior of Endeca, Selected dimension does not return as part of Endeca query guided navigation response wheneve... thumbnail 1 summary
  • Behaviour
    As per default behavior of Endeca, Selected dimension does not return as part of Endeca query guided navigation response whenever a multi-select dimension is selected. So selected dimension value does not get retained in left navigation.

    Solution
    Endeca OOTB creates a Breadcrumbs object and places all selected dimension under it. Find out solutions below :-

    1. Using Cartridges JSP - This approach can display selected dimensions in either top or bottom of the selected dimensions, not in the order that was being displayed.
    1. Set BreadCrumbs object in request scope under Breadcrumbs.jsp. Use the Set  variable in RefinementMenu.jsp <c:set var="breadCrumbsContentItem" value="${content}" scope="request" />
    2. Use Breadcrumbs object in RefinementMenu.jsp and merge with Refinement menu Object
      <c:if test="${not empty breadCrumbsContentItem.refinementCrumbs}">
      <c:forEach var="dimCrumb" items="${breadCrumbsContentItem.refinementCrumbs}">
      <c:set var="dimensionName1" value="${dimCrumb.dimensionName}" />
      <c:if test="${dimCrumb.dimensionName eq refinementMenu.dimensionName }">
      <a href="${dimCrumb.removeAction.navigationState}">${dimCrumb.label}(${dimCrumb.count})</a>
      </c:if>
      </c:forEach>
      </c:if>
    Multivalued Dimension selection using jsp approach


    2. Using Cartridge Handler- Extend RefinementMenu cartridge handler and find out following steps 
    1. Get ENEQueryResults.getNavigation().getDescriptorDimensions() to get the selected refinements.
    2. Get RefinementMenuConfig object to get the dimension order that defined in Endeca Experience manager boosted or buried section.
    3. Merge the OOTB RefinementMenu object under process() method using step 1 and 2 objects.
    Endeca Mulivalued dimension retaintion in same order


    3. Disabled Dimension -  Click here to view.


    From Author

    Was this post resolve the solution you are looking for? what do you think about this solution?Provide your comments

    How to enable SEO urls in ATG/Endeca Integration?

    Endeca provides out of the box configuration for generating SEO specific URL. Below configuration needs to be set properly to enable ATG/En... thumbnail 1 summary
  • Endeca provides out of the box configuration for generating SEO specific URL. Below configuration needs to be set properly to enable ATG/Endeca SEO integration.

    Steps to Configure SEO URL with encoded format

    1. Set urlFormatter=/atg/spring/FromSpring/seoUrlFormatter in /atg/endeca/assembler/cartridge/manager/NavigationStateBuilder/ component to enable SEO URL.

    2. Configure "seoUrlFormatter" bean object with different properties  in endeca-seo-url-config.xml as per need.
    <!-- BEAN: seoUrlFormatter This is the top-level URL formatter. 
    It is responsible for transforming UrlState objects into URL strings. -->
    <bean id="seoUrlFormatter" 
    class="com.endeca.soleng.urlformatter.seo.SeoUrlFormatter">
    <property name="useNavStateCanonicalizer">
    <value>false</value>
    </property>
    <property name="defaultEncoding">
    <value>UTF-8</value>
    </property>
    <property name="pathSeparatorToken">
    <value>_</value>
    </property>
    <property name="pathKeyValueSeparator">
    <value>-</value>
    </property>
    <property name="pathParamKeys">
    <list>
    <value>R</value>
    <value>A</value>
    <value>N</value>
    </list>
    </property>
    <property name="navStateFormatter">
    <ref bean="navStateFormatter" />
    </property>
    <property name="ERecFormatter">
    <ref bean="erecFormatter" />
    </property>
    <property name="aggrERecFormatter">
    <ref bean="aggrERecFormatter" />
    </property>
    <property name="urlParamEncoders">
    <list>
    <ref bean="N-paramEncoder" />
    <ref bean="Ne-paramEncoder" />
    <ref bean="An-paramEncoder" />
    </list>
    </property>
    </bean>


    3. Enable URL canonicalization. Click here for more details

    4. Enable N-value Encoding as per below screenshot. This setting would convert long format N-value to Encoded Format. 

    Example 

    Before Encoding
    URL - /_/N-4294865570+104910 

    After Encoding
    URL - /_/N-861Z8q7


    Endeca N-value Decode and Encode Settings for SEO Url

    5.  Set dimension formatter under dimLocationFormatters. This is a list of dimensions value that can be part of URL. dimLocationFormatters get sets under navStateFormatter. 
    Note : User aggrERecFormatter for Aggregate/Rollup Query and erecFormatter for Record Details page.

    Example - Suppose BrandFormatters added here and User selects any brand from guided navigation, Brand name would start coming on SEO URL.

    /women-clothing/adidas/_/N-8bfZ8m7


    Endeca Dimension Formatters for SEO URL


    From Author

    Was this post resolve the solution you are looking for? Provide your comments


    Wednesday, April 20, 2016

    How to Remove a deployed Endeca application?

    Endeca Application is created using deployment template available under ToolsandFramework. Do not delete the application directory before... thumbnail 1 summary
  • Endeca Application is created using deployment template available under ToolsandFramework.

    Do not delete the application directory before removing to Endeca Application from EAC.

    Find out steps below to remove Endeca application

    1.   Remove the application from Endeca Application Controller(EAC)
      1. Run eaccmd.sh list-apps from any directory.
      2. /runcommand.sh --remove-app from application control folder as per the screenshot below
      3. Execute step-1 once again to verify if the application has been removed successfully or not.
    Endeca Application --remove-app


    2.   Go to apps directory and delete application directory.

    Note : Removing application does not remove DimensionValueIdManager and record store. Find out the screen shot below.




    From Author

    Was this post resolve the solution you are looking for? what do you think about this solution?Provide your comments







      Tuesday, April 19, 2016

      How to Update EAC after updating Endeca Application Configuration?

      Endeca Application Configuration is set using AppConfig.xml and available under <<Endeca_App>>/config/script. AppConfig.xml i... thumbnail 1 summary
    • Endeca Application Configuration is set using AppConfig.xml and available under <<Endeca_App>>/config/script. AppConfig.xml is devided into multiple files and added as different xml under same folder.

      How to Update Application Configuration

      1. Navigate to <<Endeca_App>>/config/script folder.
      2. Change LiveDgraphCluster.xml and updated port
        <dgraph id="DgraphA1" host-id="LiveMDEXHostA" port="17000"
                post-startup-script="LiveDgraphPostStartup">
          <properties>
            <property name="restartGroup" value="1" />
            <property name="DgraphContentGroup" value="Live" />
          </properties>
          <log-dir>./logs/dgraphs/DgraphA1</log-dir>
          <input-dir>./data/dgraphs/DgraphA1/dgraph_input</input-dir>
          <update-dir>./data/dgraphs/DgraphA1/dgraph_input/updates</update-dir>
        </dgraph>

      3. Run  ./runcommand.sh --update-definition under control folder and the following output can be seen.

      $ ./runcommand.sh --update-definition
      [04.19.16 14:31:09] INFO: Checking definition from AppConfig.xml against existing EAC provisioning.
      [04.19.16 14:31:10] INFO: Updating definitions for dgraphs in restart group '1'.
      [04.19.16 14:31:10] INFO: Stopping component 'DgraphA1'.
      [04.19.16 14:31:12] INFO: Updating definition for component 'DgraphA1'.
      [04.19.16 14:31:16] INFO: [LiveMDEXHostA] Starting component 'DgraphA1'.
      [04.19.16 14:31:35] INFO: Publishing Workbench 'live' configuration to MDEX 'DgraphA1'
      [04.19.16 14:31:35] INFO: Job #: update-dgraph-1461094295257 Sending update to server  - file: /tmp/soap-mdex536313773579745758.xml
      [04.19.16 14:31:36] INFO: The request to the Dgraph at localhost.localdomain:17000 was successfully sent. The return code was : 200
      [04.19.16 14:31:37] INFO: Definition updated.

      4. Verify the changes - Navigate to Endeca experience manager -> EAC Admin Console and expand LiveMDEXHostA component as below screen shot

      Endeca Experience manager - EAC Admin console - LiveMDEX Host configuration







      From Author

      Was this post resolve the solution you are looking for? what do you think about this solution? Provide your comments

      How to Handle invalid record during baseline CAS record store update from ATG?

      The /atg/endeca/index/commerce/ProductCatalogSimpleIndexingAdmin component triggers baseline indexing. As part of baseline process, ATG pus... thumbnail 1 summary
    • The /atg/endeca/index/commerce/ProductCatalogSimpleIndexingAdmin component triggers baseline indexing. As part of baseline process, ATG pushes product data to Endeca record store.

      Behaviour :-

      Following error comes sometimes during baseline indexing process


      com.endeca.itl.recordstore.impl.RecordStoreImpl: Error executing method RecordStoreImpl.writeRecords()
      java.lang.NullPointerException
          at com.endeca.itl.recordstore.impl.RecordStoreImpl.handleInvalidRecord(RecordStoreImpl.java:282)
          at com.endeca.itl.recordstore.impl.RecordStoreImpl.validateRecords(RecordStoreImpl.java:274)
          at com.endeca.itl.recordstore.impl.RecordStoreImpl.writeRecords(RecordStoreImpl.java:242)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)
      2016-02-05 16:35:10,432 WARN [] [@endeca] org.apache.cxf.phase.PhaseInterceptorChain: Application {http://recordstore.itl.endeca.com/}RecordStoreService#{http://recordstore.itl.endeca.com/}writeRecords has thrown exception, unwinding now
      org.apache.cxf.interceptor.Fault
          at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:162)
          at org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.createFault(AbstractJAXWSMethodInvoker.java:213)
          at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:128)
          at org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.invoke(AbstractJAXWSMethodInvoker.java:178)
          at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:64)
          at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:75)
          at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      Caused by: java.lang.NullPointerException
          at com.endeca.itl.recordstore.impl.RecordStoreImpl.handleInvalidRecord(RecordStoreImpl.java:282)
          at com.endeca.itl.recordstore.impl.RecordStoreImpl.validateRecords(RecordStoreImpl.java:274)
          at com.endeca.itl.recordstore.impl.RecordStoreImpl.writeRecords(RecordStoreImpl.java:242)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)
          at com.endeca.itl.service.ServicePublisher$2.performInvocation(ServicePublisher.java:106)
          at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
          ... 44 more 



      Solution:-

      Invalid records are records with missing IDs (either the idPropertyName property is missing or it has a null value) or with invalid action types for the Endeca.Action property.

      Find out possible solutions below :-
      1. Pass all required properties to product data but indexing process will continue to fail until all product records get corrected
      2. Change the Record store configuration file and add "ignoreInvalidRecords" to record store configuration. Find out steps below to update record store
        1. Run command to get current record store configuration /data/endeca/CAS/11.2.0/bin->./recordstore-cmd.sh get-configuration -a Discover-data -f dataConfig.xml
        2. Add  <ignoreInvalidRecords>true</ignoreInvalidRecords> into record store configuration and save.
        3.  Run ./recordstore-cmd.sh set-configuration -a Discover-data -f dataConfig.xml to update configuration
      3. Sample Configutation file as attached
        Endeca CAS Reacord Store Ignore Invalid Record properties

      From Author
      Was this post help you to resolve the issue that you are looking for? Any other issues that you might have and need a solution?

      Click here for more ATG-Endeca Integration related issue.


      Thursday, April 14, 2016

      Endeca Cartridge Handler : How to Add dynamic Record Filter in RecordSpotlightHandler?

      The Record Spotlight cartridge handler can promote either specific records or a set of dynamic records based on a navigation state. Behavio... thumbnail 1 summary
    • The Record Spotlight cartridge handler can promote either specific records or a set of dynamic records based on a navigation state.

      Behaviour : -

      RecordSpotlightHandler provides functionality to add any static record filter OOTBs and can be setup using recordFilterBuilders properties. What if some dynamic record filters need to be applied to get featured record or recommendation.

      Example : Show 10 featured product excluding the current brand selection by the user.


      Solution :-

      Extend RecordSpotlightHandler that implements dynamic filtering based on previous request or profile.

      Find out the code below to extend


      package com.company.endeca.assembler.cartridge.handler;

      import java.util.ArrayList;

      import atg.core.util.StringUtils;
      import atg.endeca.assembler.navigation.filter.FilterUtils;
      import atg.endeca.assembler.navigation.filter.PropertyConstraint;
      import atg.servlet.DynamoHttpServletRequest;
      import atg.servlet.ServletUtil;

      import com.endeca.infront.assembler.CartridgeHandlerException;
      import com.endeca.infront.cartridge.RecordSpotlight;
      import com.endeca.infront.cartridge.RecordSpotlightConfig;
      import com.endeca.infront.cartridge.RecordSpotlightHandler;
      import com.endeca.infront.cartridge.RecordSpotlightSelection;

      public class RecommendationHandler extends RecordSpotlightHandler {
      .
      .

       public void preprocess(RecordSpotlightConfig cartridgeConfig) throws CartridgeHandlerException {

          FilterState filterState = cartridgeConfig.getRecordSelection().getFilterState();

          if (filterState != null) {
            // Update the record filter list with RecordFilters generated by the RecordFilterBuilders.
       List<String> filtersList = filterState.getRecordFilters();
       filtersList.addAll(getExcludingList(filtersList));
       selection.getFilterState().setRecordFilters(filtersList);
          }
          super.preprocess(cartridgeConfig);
        }
        
        private void getExcludingList(List<String> tobeAddedFilterList) {
      DynamoHttpServletRequest dynamoRequest = ServletUtil.getCurrentRequest();
      List<String> excludingItems = (List<String>) dynamoRequest.getAttribute("excludingItems");

      if (null != excludingItems) {
      for (String product : excludingItems) {
      tobeAddedFilterList.add(FilterUtils.not(new PropertyConstraint("product.repositoryId", product)));
      }}
      }
      .
      .
      .
      }

      Find out sample configurable cartridge templates screenshot

      Record Spotlight cartridge handlers filters


      Click here to see more post related to Endeca Cartridge Handlers

      From Author

      Was this post resolve the solution you are looking for? what do you think about this solution?
      Provide your comments

      Sunday, April 10, 2016

      Endeca Application : How to remove host entry from AppConfig files and EAC?

      AppConfig.xml import set of XML files related to host configuration, process definition etc. LiveDgraphCluster.xml contains host and port en... thumbnail 1 summary
    • AppConfig.xml import set of XML files related to host configuration, process definition etc. LiveDgraphCluster.xml contains host and port entry related to multiple Dgraph and this file is the potential candidate to add/remove host entry.

      Behaviour:-

      Suppose one new MDEX host added as per need basis and after sometimes extra MDEX host needs to be removed from LiveDgraphCluster.xml.

      <host id="LiveMDEXHostB" hostName="<<MDEXHost IP>>" port="8888" />

      Run below command. This command does not remove any host from EAC.

      ./runncommand.sh --update-definition


      Solution :- 

      --update-definition  can only add Dgraphs and MDEXHosts by updating the LiveDgraphCluster.xml  but not remove it.

      To remove MDEXHosts, below command needs to be run explicitly

      eaccmd remove-host  --app CRS --host localhost

      Remove host using eaccmd command



      Friday, April 8, 2016

      Endeca SEO : How to enable Url Canonicalization?

      Endeca Url configuration is managed in endeca-seo-url-config.xml. SeoUrlFormatter class generates the SEO URL for refinements or landing pa... thumbnail 1 summary
    • Endeca Url configuration is managed in endeca-seo-url-config.xml. SeoUrlFormatter class generates the SEO URL for refinements or landing pages.



      What is Canonical URL

      Canonicalization is the process of picking the best/one URL when there are several choices.

      Example 

      User is on Category landing page and clicked on brand "Adidas" than Brand "Element", Another user clicked on Brand "Element" than Brand "Adidas" for same Category landing page. As per URL canonicalization, only one URL should be generated, regardless of selection path.

      Scenario 1- /Men-Clothing-T-Shirts/Adidas/Element/_/N-88uZ8m7Z8mk

      Scenario 2 - /Men-Clothing-T-Shirts/Element/Adidas/_/N-8m7Z8mkZ88u

      Any crawlers would treat both URLs as different URL even product records are same and this might lower down page ranking.


      How to setup URL canonicalization?

      set useNavStateCanonicalizer as true in SeoUrlFormatter and create bean entry navStateCanonicalizer as per the screenshot below. This setting would start creating canonical URL from Endeca response
      URL Canonicalization in Endeca using useNavStateCanonicalizer


      Once above setting is applied, the example above will generate only one URL regardless of traverse path. 

      /Men-Clothing-T-Shirts/Adidas/Element/_/N-88uZ8m7Z8mk

      Note :- Enabling canonicalization impacts the breadcrumb orders. 

      Click here to get more information related to Endeca SEO


      Text Widget