cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error in Flexible search Query

mbindu55
Discoverer
0 Kudos
571

Hi,

while executing the below query I am getting the exception as shown below.

Query : "select {pk} from {cart} where {creationtime}<?date and {creationtime}>?constantDate and {isAbandon}=?isAbandon"

Exception : 20.12.03 12:00:04:450ERRORFlexible search error occured... 20.12.03 12:00:04:450ERRORQuery translation was not successful. 20.12.03 12:00:04:461ERRORCaught throwable cannot search unknown field 'TableField(name='isAbandon',langPK='null',type=cart)' within type cart unless you disable checking , infoMap=TypeInfoMap for type = 8796094005330

Can some one please suggest why I am getting this exception.

Thanks in advance.

Regards,

Bindu

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member685296
Discoverer
0 Kudos

Hi Bindu,

The message is clear. Unknown field isAbandon.

If it's a custom attribute then check what is the xml definition in items.xml.

If not then probably you are looking for abandonedCartEmailSentI which is a part of CartModel.

Best Regards,

mbindu55
Discoverer
0 Kudos

Hi,

Below is my items.xml representation.

<typegroup name="Cart"> <itemtype code="Cart" autocreate="false" generate="false"> <description>Creating a new Boolean flag for Abandon Cart functionality </description> <attributes> <attribute type="java.lang.Boolean" qualifier="isAbandon"> <defaultvalue>Boolean.FALSE</defaultvalue> <modifiers read="true" write="true" search="true" /> <persistence type="property"></persistence> </attribute> </attributes> </itemtype> </typegroup>

I have updated the system.

Still facing this issue.

When I run this in HAC it is working fine.

Kindly, suggest where I am going wrong.

Thanks,

Bindu

former_member685296
Discoverer
0 Kudos

Hi,

I can not see any obvious reason than facing this error. If the update is successful and as you are saying it is working when executing it in hac.

What else pops up in my mind is the following.

Probably you are using FlexibleSearchService() to execute the query.

What user are you using when querying? Have you set it up to be executed as admin user.

Best Regards,