lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ricci Gian Maria (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENENET-505) FastVectorHighlighter create fragment only with match at the beginning
Date Wed, 29 Aug 2012 12:57:15 GMT

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

Ricci Gian Maria commented on LUCENENET-505:
--------------------------------------------

Actually the patch is a really simple boolean property passed in another constructor of the
SimpleFragListBuilder to specify if we want match in the middle, but it can be also feasible
to insert a property in SimpleFragListBuilder called "LeftMargin". The default value is zero
so it does not introduce any problem in already existing code, if you want I can create this
patch against 3.0.3 branch.
                
> FastVectorHighlighter create fragment only with match at the beginning
> ----------------------------------------------------------------------
>
>                 Key: LUCENENET-505
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-505
>             Project: Lucene.Net
>          Issue Type: Improvement
>          Components: Lucene.Net Contrib
>    Affects Versions: Lucene.Net 2.9.4g
>            Reporter: Ricci Gian Maria
>            Priority: Minor
>         Attachments: FragListBuilder.patch
>
>
> When you use FastVectorHighlighter fragments returned have the match at the beginning.
In most situation it is much more useful to create fragments with the match in the middle.
I've included a really trivial patch to enable this with a specialized constructor of the
SimpleFragListBuilder 
> Es: FastVectorHighlighter hilighter = new FastVectorHighlighter(true, true, new SimpleFragListBuilder(true),
new SimpleFragmentsBuilder());
> The true parameter to SimpleFragListBuilder is named matchInTheMiddle so it has a descriptive
name. Probably it would be useful to create an enum to place the match at: beginning, middle,
end.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message