You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by "Vladimir (JIRA)" <ji...@apache.org> on 2011/02/11 15:50:57 UTC
[jira] Created: (LUCENENET-395) Not working WildCardFragments
nUnit-tests in Highlighter.Net 2_9_2 and trunk
Not working WildCardFragments nUnit-tests in Highlighter.Net 2_9_2 and trunk
----------------------------------------------------------------------------
Key: LUCENENET-395
URL: https://issues.apache.org/jira/browse/LUCENENET-395
Project: Lucene.Net
Issue Type: Bug
Reporter: Vladimir
Not working WildCardFragments nUnit-tests in Highlighter.Net 2_9_2 and trunk
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (LUCENENET-395) Not working WildCardFragments
nUnit-tests in Highlighter.Net
Posted by "Vladimir (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12994337#comment-12994337 ]
Vladimir commented on LUCENENET-395:
------------------------------------
It is working.
Thanks a lot DIGY.
> 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
[jira] Resolved: (LUCENENET-395) Not working WildCardFragments
nUnit-tests in Highlighter.Net
Posted by "Vladimir (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-395?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vladimir resolved LUCENENET-395.
--------------------------------
Resolution: Not A Problem
> 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
[jira] Commented: (LUCENENET-395) Not working WildCardFragments
nUnit-tests in Highlighter.Net
Posted by "Digy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12993743#comment-12993743 ]
Digy commented on LUCENENET-395:
--------------------------------
What about posting a *minimal* test case?
Also note that Highlighter.Net was ported while Lucene.Net was at version 2.0, and not much fixes/changes have been done after that.
Have you tried FastVectorHighLighter?
DIGY
> 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
[jira] Commented: (LUCENENET-395) Not working WildCardFragments
nUnit-tests in Highlighter.Net
Posted by "Vladimir (JIRA)" <ji...@apache.org>.
[ 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
[jira] Commented: (LUCENENET-395) Not working WildCardFragments
nUnit-tests in Highlighter.Net
Posted by "Vladimir (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12994227#comment-12994227 ]
Vladimir commented on LUCENENET-395:
------------------------------------
Test case from file: Lucene.Net_2_9_2\contrib\Highlighter.Net\Test\HighlighterTest.cs
Test name: TestGetMidWildCardFragments()
I think, problem is in the QueryScorer because it always return 0-score for all tokens.
How to use FastVectorHighLighter for xaml-highlight?
> 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
[jira] Commented: (LUCENENET-395) Not working WildCardFragments
nUnit-tests in Highlighter.Net
Posted by "Digy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12994311#comment-12994311 ]
Digy commented on LUCENENET-395:
--------------------------------
Regarding to TestGetMidWildCardFragments,
Just add
{code}
if(query is MultiTermQuery)
{
((MultiTermQuery)query).SetRewriteMethod(MultiTermQuery.SCORING_BOOLEAN_QUERY_REWRITE);
}
{code}
before query.Rewrite(reader)
in "DoSearching".
DIGY
> 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
[jira] Updated: (LUCENENET-395) Not working WildCardFragments
nUnit-tests in Highlighter.Net
Posted by "Vladimir (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-395?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vladimir updated LUCENENET-395:
-------------------------------
Description: Not working WildCardFragments nUnit-tests in Highlighter.Net (was: Not working WildCardFragments nUnit-tests in Highlighter.Net 2_9_2 and trunk)
Environment:
Lucene.Net 2.9.2 VS2010
Summary: Not working WildCardFragments nUnit-tests in Highlighter.Net (was: Not working WildCardFragments nUnit-tests in Highlighter.Net 2_9_2 and trunk)
> 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