Hi !
I've got some problems with text highlighting. I'am using some special library that handles text reduceing/canonization (used language is Polish). The reduced words has no flexion (which is usefull feature in the context of searching). The problem is when i try to perform text highlighting because the highlighting tags are not in a correct position (they are shifted), for example: this is s<br>ome tex</br> t to highlight. The canonization library is integrated with analyzer in the following manner:
public final class MyAnalyzer extends Analyzer
{
  public TokenStream tokenStream(String fieldName, Reader reader)
 {
  MyCanonizer textCanonizer = new MyCanonizer();
TokenStream ts = new StandardTokenizer(textCanonizer.peformCanonization(reader));
  return ts;
 }
}

Could anybody say why the highlights are shifted and/or how to solve the problem ?

Thanks,
JanK

Reply via email to