Srijan Bhatnagar created OAK-3674:
-------------------------------------

             Summary: Search Excerpt highlighting is not correct
                 Key: OAK-3674
                 URL: https://issues.apache.org/jira/browse/OAK-3674
             Project: Jackrabbit Oak
          Issue Type: Bug
          Components: query
    Affects Versions: 1.0.23, 1.0.18
            Reporter: Srijan Bhatnagar


We have the following text on a jcr:content node :
{code}A state agency’s Conflict of Interest Code must reflect the current 
structure of the organization and properly identify officials 
andemployees{code} 

On executing the following query :
{code}//*[jcr:contains(., 'conflict of interest')]/rep:excerpt(.){code}

we get a row whose excerpt value is having wrong placement of <strong></strong> 
tags.

Observed result:
{code}<div><span>&lt;p&gt;A state agency’s Conflict <strong>of</strong> 
Interest Code must reflect the current structure <strong>of</strong> the 
organization and properly identify <strong>of</strong>ficials 
andemployees&lt;/p&gt;</span></div>{code}

I don't think it is expected to have {quote}<strong>of</strong>ficials{quote} 
in the excerpt.

We get the excerpt value in the following manner :
org.apache.jackrabbit.oak.jcr.query.RowImpl#getValue("rep:excerpt(" + nodePath 
+ ")")





--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to