jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Parvulescu (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JCR-3285) org.apache.jackrabbit.core.query.lucene.DefaultHighlighter.doHighlight doesn't hightlight matches correctly if full text query has multiple terms
Date Fri, 20 Apr 2012 09:58:41 GMT

    [ https://issues.apache.org/jira/browse/JCR-3285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13258126#comment-13258126
] 

Alex Parvulescu commented on JCR-3285:
--------------------------------------

I'm having some trouble understanding/reproducing this, can you give some examples?

The best way would be to use existing tests [0] and build one that illustrates the problem,
then submit it as a patch.
If you want to go for the gold, you can also include a fix with that patch ;)

[0] https://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/ExcerptTest.java?view=markup
                
> org.apache.jackrabbit.core.query.lucene.DefaultHighlighter.doHighlight doesn't hightlight
matches correctly if full text query has multiple terms
> -------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: JCR-3285
>                 URL: https://issues.apache.org/jira/browse/JCR-3285
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 2.2.10, 2.2.11, 2.4
>            Reporter: Maksim Konstantinov
>            Priority: Trivial
>              Labels: excerpt, fulltext, highlight, search
>
> org.apache.jackrabbit.core.query.lucene.DefaultHighlighter: line 204-207
> It seems, that int index = 0; counter is not being reset in new iteration over the next
array of  termoffsets, which leads to the following consequences:
> All the occurrences of the first query term (in case there are several of them), except
for the first on are being compared to offset of a last termoffset of the following terms.
> So some of matches are being skipped.
> Suggested fix: reset int index to zero inside the while loop on line 205

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message