You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Koji Sekiguchi (JIRA)" <ji...@apache.org> on 2011/05/28 05:47:47 UTC

[jira] [Resolved] (LUCENE-3141) FastVectorHighlighter - expose FieldFragList.fragInfo for user-customizable FragmentsBuilder

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

Koji Sekiguchi resolved LUCENE-3141.
------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 3.2)
                   3.3

trunk: Committed revision 1128549.
3x: Committed revision 1128550.


> FastVectorHighlighter - expose FieldFragList.fragInfo for user-customizable FragmentsBuilder
> --------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3141
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3141
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: modules/highlighter
>    Affects Versions: 2.9.4, 3.0.3, 3.1
>         Environment: Lucene 3.1
>            Reporter: Sujit Pal
>            Assignee: Koji Sekiguchi
>            Priority: Minor
>              Labels: features, lucene,
>             Fix For: 3.3, 4.0
>
>         Attachments: LIABookTest.java, LIABookTest.java, LUCENE-3141.patch, lucene-3141-patch-2.diff, lucene-3141-patch.diff
>
>
> Needed to build a custom highlightable snippet - snippet should start with the sentence containing the first match, then continue for 250 characters.
> So created a custom FragmentsBuilder extending SimpleFragmentsBuilder and overriding the createFragments(IndexReader reader, int docId, String fieldName, FieldFragList fieldFragList) method - unit test containing the code is attached to the JIRA.
> To get this to work, needed to expose (make public) the FieldFragList.fragInfo member variable. This is currently package private, so only FragmentsBuilder implementations within the lucene-highlighter o.a.l.s.vectorhighlight package (such as SimpleFragmentsBuilder) can access it. Since I am just using the lucene-highlighter.jar as an external dependency to my application, the simplest way to access FieldFragList.fragInfo in my class was to make it public.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

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