[ 
https://issues.apache.org/jira/browse/JCR-2366?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marcel Reutegger resolved JCR-2366.
-----------------------------------

    Resolution: Invalid

There is an alternative excerpt provider implementation that handles phrase 
searches better. However the default configuration does not use it. You need to 
change your workspace.xml and set a parameter in the SearchIndex element:

<param name="excerptProviderClass" 
value="org.apache.jackrabbit.core.query.lucene.WeightedHTMLExcerpt"/>

See also: http://wiki.apache.org/jackrabbit/Search

> rep:excerpt does not properly highlight phrase based searches
> -------------------------------------------------------------
>
>                 Key: JCR-2366
>                 URL: https://issues.apache.org/jira/browse/JCR-2366
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core, query
>    Affects Versions: 1.6.0
>         Environment: Win XP-pro; Win 2003 Enterprise 32bit
>            Reporter: Jeremy Anderson
>
> When performing phrase searches using Xpath with rep:excerpt, the exceprts do 
> not properly highlight the phrase terms as phrases.  Each term in a phrase is 
> highlighted independant of the others in the phrase, as individual 
> single-term matches. 
> EX.:   search for  [(jcr:contains(.,'"first second third"'))]/(rep:excerpt(.))
> The excerpts retrieved may be:
> "test test blah <strong>first</strong> blah blah blah"
> "blah blah <strong>second</second> blah blah blah"
> "blah blah blah <stong>third</strong> blah blah <strong>second</strong> blah 
> <strong>first</strong> blah"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to