You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2009/01/08 17:12:59 UTC

[jira] Resolved: (LUCENE-1497) Minor changes to SimpleHTMLFormatter

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

Michael McCandless resolved LUCENE-1497.
----------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 2.4.1)
    Lucene Fields: [New, Patch Available]  (was: [Patch Available, New])

Committed revision 732739.

Thanks Shai!

> Minor changes to SimpleHTMLFormatter
> ------------------------------------
>
>                 Key: LUCENE-1497
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1497
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: contrib/highlighter
>            Reporter: Shai Erera
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.9
>
>         Attachments: LUCENE-1497.patch
>
>
> I'd like to make few minor changes to SimpleHTMLFormatter.
> 1. Define DEFAULT_PRE_TAG and DEFAULT_POST_TAG and use them in the default constructor. This will not trigger String lookups by the JVM whenever the highlighter is instantiated.
> 2. Create the StringBuffer in highlightTerm with the right number of characters from the beginning. Even though StringBuffer's default constructor allocates 16 chars, which will probably be enough for most highlighted terms (pre + post tags are 7 chars, which leaves 9 chars for terms), I think it's better to allocate SB with the right # of chars in advance, to avoid char[] allocations in the middle.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org