Showing posts with label Core Endeca. Show all posts
Showing posts with label Core Endeca. Show all posts

Endeca Tools and Framework IFCR log with Heap size issue - Endeca Tools and Framework

IFCR Log:
12.02.2016 16:23:51.770 *ERROR* [10.49.186.35 [1455311472252] POST /ifcr/system/endeca/sitePromoter HTTP/1.1] org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager failed to read property state: 1ad8274a-706a-46cd-bc0c-51866b5fe27f/{http://www.jcp.org/jcr/1.0}data java.sql.SQLException: Java exception: 'Java heap space: java.lang.OutOfMemoryError'.

12.02.2016 09:34:30.995 *ERROR* [10.49.186.35 [1455285129628] POST /ifcr/system/endeca/sitePromoter HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught Throwable java.lang.OutOfMemoryError: Java heap space

12.02.2016 09:34:50.576 *ERROR* [http-8006-26] org.apache.sling.extensions.threaddump.internal.Activator Uncaught exception in Thread Thread[http-8006-26,5,main] java.lang.NullPointerException        at java.util.concurrent.ConcurrentLinkedQueue.offer(ConcurrentLinkedQueue.java:190)    


Solution:
In Workbench 3.1.x or 11.x (within Endeca Tools and Frameworks), the setting can be modified by editing the -Xmx value in $ENDECA_TOOLS_ROOT/server/bin/workbench.sh


- Default Setting is 1 GB and you can increase it to 2 GB or as required.


# Prepend WB_CATALINA_OPTS to standard Workbench CATALINA_OPTS
CATALINA_OPTS="${WB_CATALINA_
OPTS} -Xms256m"
CATALINA_OPTS="${CATALINA_
OPTS} -Xmx2G"
After making this change the Workbench must be stopped and restarted for the change to take affect.

Keyword Redirects - Endeca Best Practices

Use keyword redirects to drive users who are searching on common self-service terms to the appropriate pages, rather than searching the data set for related entries.

Ex: https://www.shopmyexchange.com

It Redirect a user who searches on shipping to the Shipping and Delivery page instead of returning catalog results with that term in the title

Thesaurus - Endeca Best Practices

1) Examine search reports regularly
2) Both most popular search terms and most commonly failed searches should be used as sources for thesaurus entries

When not to create Thesaurus entries:
a) Spelling correction
b) One-way subsets of words, e.g., Elvis to Elvis Presley
c) Plurals
d) Word breaks, e.g., Firefly to Fire fly
e) Capitalization
f) Special characters like & or $

Auto-Correction / Spell Correction - Endeca Best Practices

1) Applications should present feedback and clarification to users about spelling corrections

 

2) The MDEX Engine flag --spell-glom should be used to enable cross-field spell correction. This will enlarge the dynamic spelling dictionary created by the engine by including entries across different properties or dimensions.

Endeca - Cascading Search

Definition:
An Endeca application can be configured to search a variety of record properties or search interfaces in order of decreasing importance. This “cascading search” provides the best possible experience to users by presenting highly relevant results when they are available, and, if not, returning the potentially less relevant results that would otherwise have remained hidden.

For example, many product catalogs contain at least two fields that describe an item: a title field with, e.g., brown shoes and a description field of, e.g., these formal brown shoes complement navy socks. 

Users searching for navy socks generally would not find this result relevant, but it’s probably better than returning nothing if there are no other matches for navy socks.

How to implement it? 
- Create second search interface that contains all of the searchable fields from the original interface, plus the description field(s).
- Add application logic where search across first interface and if you get fewer than N results then search across second search interface

N can be equal to zero, or a small number like 2 or 5 or 10.

Best Practice:
1) If the data set has descriptions that contain marketing text or other copy that does not directly describe the record in question, exclude them from search if at all possible.

2) If excluding semi-relevant descriptions is not feasible or desired, implement cascading search, so that these properties are searched only when fewer than N results are returned.

3) Cascading search applications should use the MatchAll match mode on the primary interface and MatchAllPartial on the secondary (long description) interface.

Endeca Stop Words - Endeca Best Practices


Regularly review the current stop word list and reconcile it against the most popular searches. 

Remove as stop words any terms that are searched on regularly, or set those terms as keyword redirects to useful overview pages.

A list of potentially useful stop words: a, an, the, how, do, I, me, and, no or, when, where, why, are, is, you, have, it, from, over, under

What is Endeca Dimension Groups? - Core Endeca

What is Endeca Dimension Groups?
Dimension groups allow you to organize dimensions into groupings for presentation purposes. 
Dimension groups allow the user to select dimension values from each of the dimensions contained in them.

How to define it using Endeca Pipeline?

Example: Discover Electronics Application





How it Looks in the the Endeca reference application?
How to retrieve it on Front end application?

Code Snippet:

package com.endeca.presentation;

import com.endeca.navigation.DimGroup;
import com.endeca.navigation.DimGroupList;
import com.endeca.navigation.DimValIdList;
import com.endeca.navigation.Dimension;
import com.endeca.navigation.DimensionList;
import com.endeca.navigation.ENEConnection;
import com.endeca.navigation.ENEQuery;
import com.endeca.navigation.ENEQueryException;
import com.endeca.navigation.ENEQueryResults;
import com.endeca.navigation.HttpENEConnection;

/**
 *
 * @author Ravi Honakamble
 *
 */

public class DimensionGroupClient {

    private static final String MDEX_HOST = "localhost";
    private static final Integer MDEX_PORT = 15000;
    /**
     * @param args
     * @throws ENEQueryException
     */
    public static void main(final String[] args) throws ENEQueryException {
        final ENEQueryResults results = createConnection().query(createNavigationQuery("0"));
        final DimGroupList dimGroupList = results.getNavigation().getCompleteDimGroups();
        for(final Object element : dimGroupList){
            final DimGroup dimGroup = (DimGroup) element;
            System.out.println(dimGroup.getId());
            System.out.println(dimGroup.getName());
        }
    }
    private static ENEQuery createNavigationQuery(final String nValue) {
        final ENEQuery query = new ENEQuery();
        final DimValIdList dimValIdList = new DimValIdList(nValue);
        query.setNavDescriptors(dimValIdList);
        query.setNavNumERecs(100);
        return query;
    }
    /**
     * @return
     */
    private static ENEConnection createConnection() {
        return new HttpENEConnection(MDEX_HOST, MDEX_PORT);
    }

}
.