Yes, your code is wrong!
Where is the highlighter span/formatter, because from your code what I can
see is that you are just passsing the score to Queryscorer, instead you
should pass both queryscore as well as formatter
>From my previous mail you can see the following code and mimic the same and
it will work without any hitch,

QueryScorer scorer = new QueryScorer(phrase);

    SimpleHTMLFormatter formatter =
        new SimpleHTMLFormatter("<span class=\"highlight\">",
            "</span>");
    Highlighter highlighter = new Highlighter(formatter, scorer);

and this is your code,

Highlighter highlighter = new Highlighter(new QueryScorer(query));

You missed the formatter altogether but you added thestyler at the end,
though. Add it and it will work like a charm.

--KK





On Wed, May 27, 2009 at 10:40 PM, Ritu choudhary <ritu.it...@gmail.com>wrote:

> Am i coding it wrongly ...please reply.
>

Reply via email to