hello.

i've tried to highlight string using Highligheter(2.4.1) and JapaneseAnalyzer
but the following code extract show the problem

String F = "f";
String CONTENTS = "AAA :BBB CCC";
JapaneseAnalyzer analyzer = new JapaneseAnalyzer();
QueryParser qp = new QueryParser( F, analyzer );
Query query = qp.parse( "BBB" );
Highlighter h = new Highlighter( new QueryScorer( query, F ) );

System.out.println( h.getBestFragment( analyzer, F,  CONTENTS ) );

The sytsem outputs
<B>AAA</B> :BBB CCC

When you change CONTENTS to "AAA _BBB CCC"
the system outputs

AAA _<B>BBB</B> CCC

Are there any problems?
Thanks in advance

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to