Expand my Community achievements bar.

SOLVED

AEM/CQ5 search - hit.excerpt throws errors

Avatar

Former Community Member

When using the search API, sometimes if you call hit.excerpt(), you see errors get thrown in the logs and the output to the screen includes parts of html elements.  For example, the output might include literal as below:

 

handbook.pdf']); href="https://forums.adobe.com/longpathgoeshere/file.pdf"

 

I can't find the source to check, but my guess is that the excerpt code looks at properties of content nodes, finds the matching text in that node, and then grabs some amount of text on either side of the item that was found, which might land it in the middle of an html tag, so it can't cleanly remove the tag.  Just guessing.

 

Is this a known issue, and is there a work-around for this?

 

I'm on 5.6.0

 

Thanks,

 

David

1 Accepted Solution

Avatar

Correct answer by
Level 10

dvd.purcell wrote...

Thanks for getting back on this.  Yes, it is the StringOutOfBoundsException.  Our com.day.cq.cq-search bundle is 5.6.4, so apparently it isn't fixed in this version...Any thoughts on what version it might be fixed in?

Thanks,

David

 


I am pretty sure it is fixed in 5.6 & your bundle version looks right. Clear /var/classes/*  and verify. If issue persist please file a daycare.

View solution in original post

5 Replies

Avatar

Level 10

Assuming the error is StringIndexOutOfBoundsException.   This should be fixed in 5.6 what is the bundle version of com.day.cq.cq-search?

Avatar

Former Community Member

Thanks for getting back on this.  Yes, it is the StringOutOfBoundsException.  Our com.day.cq.cq-search bundle is 5.6.4, so apparently it isn't fixed in this version...Any thoughts on what version it might be fixed in?

Thanks,

David

Avatar

Correct answer by
Level 10

dvd.purcell wrote...

Thanks for getting back on this.  Yes, it is the StringOutOfBoundsException.  Our com.day.cq.cq-search bundle is 5.6.4, so apparently it isn't fixed in this version...Any thoughts on what version it might be fixed in?

Thanks,

David

 


I am pretty sure it is fixed in 5.6 & your bundle version looks right. Clear /var/classes/*  and verify. If issue persist please file a daycare.

Avatar

Former Community Member

Clearing it didn't help.  I'm not familiar with submitting daycare tix - can you point me to the place to submit?

Thanks for the help.

- David

Avatar

Level 10

dvd.purcell wrote...

Clearing it didn't help.  I'm not familiar with submitting daycare tix - can you point me to the place to submit?

Thanks for the help.

- David

 

The AEM Support Portal (aka DayCare) is accessible with your Adobe-Id credentials. For more details on how to contact support, please visit http://helpx.adobe.com/marketing-cloud/contact-support.html  There is online agent who can help you & make sure you have customer/contract id handy.