[EMAIL PROTECTED] wrote:
public void characters(char[] ch, int start, int length) {
if (ch.length > 0 && start >= 0 && length > 1) {
- String text = new String(ch, start, length);
if (elementStack.size() > 0) {
IndexHelperField tos = (IndexHelperField) elementStack.peek();
- tos.appendText(text);
+ tos.appendText(ch, start, length);
}
- bodyText.append(text);
+ bodyText.append(' ');
+ bodyText.append(ch, start, length);
}
}
What will happen when "keyword" text is streamed as two characters events, "key" and "word"? I think it will become "key word", and indexing will break.
IIUC, idea was to add a space in between tags, i.e. so <p>some</p><p>text</p> is not indexed as "sometext". If that's correct, then better fix would be to add space only if boolean flag had_start_or_end_element_in_between_char_events set.
Joerg?
Vadim
