Oracle Endeca – Load dimension tree using dimension search.

Today we will share you sample program that load the whole dimension tree from Oracle Endeca MDEX. This program is using presentation API to make dimension search. Dimension search result is organized into a tree structure using custom data structure. This program is connecting to MDEX in the localhost running on port 15000. This program is tested against Oracle Endeca Discover Electronics reference application.

Oracle Endeca Dimension Search Client.

DimensionTree Bean to organize dimensions into a tree structure.

Dimension Bean for presentation purpose.

Program is written only for demonstration purpose. Tested against three level dimension tree. (Level -> Level2 -> Level3) This program may not be helpful if your dimension tree has got more than tree levels. Complete source code can be downloaded from here.

8 thoughts on “Oracle Endeca – Load dimension tree using dimension search.

  1. Anirban Lahiri said:

    I don’t know how to thank you enough!! :) it works like a beauty.. The only customizations that I needed to do were
    1. adding query.setDimSearchDimension(new Long(“100″)); to start from the node I wish to, and
    2. overriding the toString function to return me an xml-like structure:

    public String toString() {
    return “”
    + refinements + “”;

    • Sanju Thomasourownjava said:

      hi Anirban, I am glad to know that it helped you.

  2. Sri said:

    Hi Adrian,

    I tried your example..
    query.setDimSearchTerms(“*”); this query returning zero results.. If I pass any one character like
    query.setDimSearchTerms(“*a*”); then I am getting the results with letter “a”

    But I need to get all the dimensions .. how to get it ? Pl help me to solve this issue.

    I really appreciate your help.

  3. Sanju ThomasSanju Thomas said:

    Did you check if the Wildcard search is enabled?

  4. Shubham said:

    Excellent piece of code and details associated, it worked very swiftly. With very small changes I would be able to use it as per my need.

    Many Thanks!, Keep up the good work!

  5. Binish said:

    Hi Sanju,
    Thanks you so much. Its people like you who keeps internet so useful. Thanks again.

  6. akris said:

    Good work ! It was very useful even after 3 years ! Could you tell us know to get Level2 with just level1 and level 3 with level1+level2 ?