Which version are you using? I believe that this is a bug that was fixed last August...but that the fix is only in the 2.1 Highlighter version. Try grabbing the latest highlighter code from the trunk.

- Mark

heikki doeleman wrote:
Hi there,

I'm having some strange behaviour using the highlighter and I'm wondering if
it is a bug or should I take a different approach ?

I want to highlight the search terms that were used to execute a query. If the search terms end in an end-bracket or end-square-bracket (so ')' or ']'
), the resulting highlighted piece no longer contains the end bracket; it
just disappeared !

For exqmple searching for Vera, Yvonne (1964- ) and highlighting the
results, would produce <span class="highlight">Vera, Yvonne (1964- </span>.

The same thing happens if I use quotes to try phrase searching, for example
"Vera, Yvonne (1964- )".

The field is indexed using a standard tokenizer. It makes no difference if I
use Field.Index.UN_TOKENIZED or Field.Index.TOKENIZED when creating the
index.

In the highlighting I create a query from the search terms and rewrite it. I tried both creating a PhraseQuery, and I tried the QueryParser.parse() using
the same analyzer used for indexing and searching. Nothing helps !! Also
tried escaping the brackets, to no avail.

Any help would be very much appreciated !

thank you
Heikki Doeleman


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

Reply via email to