Vinicius Carvalho wrote:
Hello there! When I use an wildcard with my query, for instance: java*.
Lucene finds the document, but when using the highlighter, the
getBestFragment() is returning null for a fragment that contains the word
javadoc for instance. Is it possible to use the hightlighter with wildcards?
One option I found is to display the original contents instead, but, the
nice thing about the highlighter is that it allows me to define a fragment
size, so I don't need to display an entire string, just a part of it. If I
skip the highlighter for the null fragments, is it possible to display only
a fragment of the indexed field?
Regards
Try calling query.rewrite before passing it to the Highlighter. You have
to do this to cover all of the truncation queries.
- Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]