Skip to Content
0
Former Member
Mar 17, 2009 at 10:08 PM

MDM4J Search Options

22 Views

Hello

I would like to know the feasibility of the following requirement

When I search for a Product "NX-8" in the repository, I expect the the system to return all the product whose name matches "NX-8" and they should be aligned based on other field "Item Status".

For example, following are the products in repository

NX-8 - Active

NX-816 - InActive

NX-823 - Active

When I do search, I expect the following results in order

NX-8 - Active

NX-823 - Active

NX-816 - InActive

Basically, I want all the inactive products to be displayed at the last in the search results.

Please let me know if the above stuff is possible through MDM4J APIs.

As of now, here is my search code logic, just pick the products irrespective of 'item status'

Search search = new Search(ConfigProperties.getProduct_table());

FreeFormTableParameter fftpNames = search.GetParameters().NewFreeFormTableParameter(ConfigProperties.getProduct_table());

FreeFormParameterField ffpfName = fftpNames.GetFields().New("SKU");

ffpfName.GetFreeForm().NewString(searchValue, FreeFormParameter.SubstringSearchType);

A2iResultSet rs = catalogData.GetResultSet(search, rsd, "SKU", true, page);

Thanks

Prakash