lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENENET-395) Not working WildCardFragments nUnit-tests in Highlighter.Net
Date Mon, 14 Feb 2011 10:22:57 GMT

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

Vladimir commented on LUCENENET-395:
------------------------------------

My sample code:

The fragments always is NULL.

 Analyzer analyzer = GetAnalyzer();

            var queryParser = new MultiFieldQueryParser(new[] { "Title", "Solution", "Symptom",
"Number" },
                                                        analyzer);
            queryParser.SetAllowLeadingWildcard(true);

            Query query = queryParser.Parse(searchText);

            ScoreOrderFragmentsBuilder sfb = new ScoreOrderFragmentsBuilder();
            FieldQuery fq = new FieldQuery(query, true, true);
            FieldTermStack stack = new FieldTermStack(indexReader, docId, "Title", fq);
            FieldPhraseList fpl = new FieldPhraseList(stack, fq);
            SimpleFragListBuilder sflb = new SimpleFragListBuilder();

            FieldFragList ffl = sflb.CreateFieldFragList(fpl, 20);

            var fragments = sfb.CreateFragments(indexReader, docId, "Title", ffl, 5);

> Not working WildCardFragments nUnit-tests in Highlighter.Net
> ------------------------------------------------------------
>
>                 Key: LUCENENET-395
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-395
>             Project: Lucene.Net
>          Issue Type: Bug
>         Environment: Lucene.Net 2.9.2 VS2010
>            Reporter: Vladimir
>
> Not working WildCardFragments nUnit-tests in Highlighter.Net

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

        

Mime
View raw message