Skip to Content
0
Former Member
Jul 10, 2008 at 06:54 PM

How to do this type of Search using MDM Java API ?

69 Views

Hello MDM Gurus:

Here is my MDM Java Search problem.

I am searching in the main table "Products", for the fields

-Product Name

-Category (a taxonomy lookup field).

Since Category is a taxonomy lookup field, I am using

SupportingResultDefinition, for it.

Then I have Child_ID(field) value of Category(table).

It is a numerical value.

To formulate the search item, to be given to the Search

Object, I used PicklistSearchConstraint, and Keyword

SearchDimension, like...

FieldId ctgChildIdFID =  bseConnDtls.getFieldId("Categories", "Child_ID");
MdmValue[] lkpValueArray = getMatchingCategoryFieldIds(wdThis,srchString,"Categories","Child_ID",bseConnDtls);
// To limit the results from a search by a lookup field you can use a PickListSeachConstraint 
PickListSearchConstraint plsc = new PickListSearchConstraint(lkpValueArray);
// Don't use the below command, because it should not be used for 
// taxonomy and qualified table fields
//FieldSearchDimension fsd = new FieldSearchDimension(ctgChildIdFID); 
KeywordSearchDimension kwsd = new KeywordSearchDimension();
search.addSearchItem(kwsd, plsc);

Now I continue with the rest of the coding, and I am getting the

following error "Unexpected Search Dimension type 3"

Anybody has any ideas ??

Your help is highly appreciated,

Prasad Nutalapati