Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-User
Highligheter fails using JapaneseAnalyzer
 

Index | Next | Previous | View Flat


sake-ginjyo at nifty

Jun 30, 2009, 7:16 AM


Views: 659
Permalink
Highligheter fails using JapaneseAnalyzer

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-unsubscribe[at]lucene.apache.org
For additional commands, e-mail: java-user-help[at]lucene.apache.org

Subject User Time
Highligheter fails using JapaneseAnalyzer sake-ginjyo at nifty Jun 30, 2009, 7:16 AM
    Re: Highligheter fails using JapaneseAnalyzer mhall at informatics Jun 30, 2009, 7:41 AM
        Re: Highligheter fails using JapaneseAnalyzer sake-ginjyo at nifty Jul 1, 2009, 7:22 AM
            Re: Highligheter fails using JapaneseAnalyzer markharw00d at yahoo Jul 1, 2009, 7:31 AM
                Re: Highligheter fails using JapaneseAnalyzer sake-ginjyo at nifty Jul 1, 2009, 8:13 AM
                    Re: Highligheter fails using JapaneseAnalyzer markharw00d at yahoo Jul 1, 2009, 8:55 AM
                        Re: Highligheter fails using JapaneseAnalyzer sake-ginjyo at nifty Jul 1, 2009, 9:39 AM
                            Re: Highligheter fails using JapaneseAnalyzer markharw00d at yahoo Jul 1, 2009, 2:25 PM
                                Re: Highligheter fails using JapaneseAnalyzer mhall at informatics Jul 2, 2009, 5:59 AM
                                Re: Highligheter fails using JapaneseAnalyzer sake-ginjyo at nifty Jul 2, 2009, 3:28 PM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.