lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerryjun <gerry...@yahoo.com>
Subject lucene-highlighter 3.6 No highlight for 3 letter words
Date Fri, 08 Jun 2012 11:17:45 GMT
Hi, 

    How can i highlight 3 letter words? everything is working except for
this, what setting do i need to change?

    Im using  lucene-highlighter-3.6.0.jar & lucene-core-3.6.0.jar.


        Analyzer analyzer = new StandardAnalyzer(Version.LUCENE_30);
        QueryParser parser = new QueryParser(Version.LUCENE_30, "",
analyzer);
        parser.setAllowLeadingWildcard(true);
        SimpleHTMLFormatter htmlFormatter = new SimpleHTMLFormatter("","");
        Highlighter highlighter = new Highlighter(htmlFormatter,new
QueryScorer(parser.parse(pQuery)));
        highlighter.setTextFragmenter(new NullFragmenter()); 
        highlighter.setMaxDocCharsToAnalyze(Integer.MAX_VALUE);
        String text = highlighter.getBestFragment(analyzer, "", pText);

Thanks

--
View this message in context: http://lucene.472066.n3.nabble.com/lucene-highlighter-3-6-No-highlight-for-3-letter-words-tp3988464.html
Sent from the Lucene - Java Developer mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message