on 12-26-2014 1:59 PM
Hi,
I am getting "SQL search error : incompatible data type" while searching with enum data type in simple search.
how to add enum data type and other data types [date] in configuration file , for simple search.
I have tried by adding enum data type as mentioned below, It is not working. I got "SQL search error : incompatible data" Error, while searching.
Ex:
<yss:simple-search xmlns:yss="http://www.hybris.com/cockpitng/config/simplesearch">
<yss:field name="code"/>
<yss:field name="name"/>
<yss:field name="remarks"/>
<yss:field name="pk"/>
<yss:field name="approvalStatus"/> *********** Enum Data type**********
<yss:sort-field name="name" asc="true"/>
</yss:simple-search>
Error :
ERROR [hybrisHTTP38] [FlexibleSearch] Flexiblesearch error: SQL search error : incompatible data type in operation query = 'SELECT item_t0.PK FROM products item_t0 LEFT JOIN productslp lp_t0_l1 ON item_t0.PK = lp_t0_l1.ITEMPK AND lp_t0_l1.LANGPK =? LEFT JOIN productslp lp_t0 ON at de.hybris.platform.servicelayer.search.impl.DefaultFlexibleSearchService$2.execute(DefaultFlexibleSearchService.java:384) at de.hybris.platform.servicelayer.search.impl.DefaultFlexibleSearchService$2.execute(DefaultFlexibleSearchService.java:1) at de.hybris.platform.servicelayer.session.impl.DefaultSessionService.executeInLocalView(DefaultSessionService.java:88) at de.hybris.platform.servicelayer.search.impl.DefaultFlexibleSearchService.getJaloResult(DefaultFlexibleSearchService.java:363) at de.hybris.platform.servicelayer.search.impl.DefaultFlexibleSearchService.search(DefaultFlexibleSearchService.java:164) at de.hybris.platform.genericsearch.impl.DefaultGenericSearchService$1.execute(DefaultGenericSearchService.java:108) at de.hybris.platform.servicelayer.session.impl.DefaultSessionService.executeInLocalView(DefaultSessionService.java:88)
Kindly help on this issue.
Thanks in advance. Anjan
Hi,
Were you able to find the solution for it?
Thanks in advance!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is not possible as the non atomic attributes are omitted in simple search. Look at the AbstractSearchController class's isApplicableForSimpleSearch method:
protected boolean isApplicableForSimpleSearch(String typeCode, String fieldName) {
DataAttribute attribute = this.typeFacade.getAttribute(typeCode, fieldName);
if (attribute == null) {
LOG.warn("Could not load DataAttribute for field [{}] of type [{}]", fieldName, typeCode);
return false;
} else if (!attribute.getDefinedType().isAtomic()) {
LOG.warn("SimpleSearch configured incorrectly for type [{}]. Non-atomic field [{}] has been omitted", typeCode, fieldName);
return false;
} else {
return true;
}
}
Thanks for your response.
Thanks, Anjan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello
currently it is not possible to configure enum field in simple search mode, you have to use in such case advanced mode, but we added such task to cockpitng backlog!
Cheers,
Adam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.