I suspect you are using a different analyzer to highlight than you are using to search.

A couple of things you can check:

Immediately after your query simply print out hits.length, this should conclusively tell you that you query is in fact working, after that ensure that you are using the same analyzer for your highlighter that you are for your query parser.

If you are not, its entirely possible that the text you are trying to highlight with is being transformed differently than how it was in the query, and as a result isn't matching against your fields anymore.

Hope that helps,

Matt

JensBurkhardt wrote:
Hello everybody,

I have s slight problem using lucenes highlighter. If i have the highlighter
enabled, a query creates 0 hits, if i disable the highlighter i get the
hits.
It seems like, when i call searcher.search() and pass my Hits hits to the
highlighter function, the program quits. All prints after the highlighter
call also do not appear.
I have no idea what the problem is.
Thanks in advise

Jens Burkhardt


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to