You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Weiwei Wang <ww...@gmail.com> on 2009/12/14 06:32:39 UTC
Problem in MappingCharFilter and PatternReplaceCharFilter
Hi, guys,
1. how to deal with c++c++ or c++abc using MappingCharFilter
i use a NormalizeMap("c++","cplusplus"), the analyzed result will be
cpluspluscplusplus or cplusplusabc wich is not what i want
if i use a NormalizeMap("c++","cplusplus$"), the offset will not be correct.
2. I use PatternReplaceCharFilter to filter season07 or something like this
into season 07, the pattern i use is shown below
String pattern = "([\\p{Alpha}]+)(\\d+)";
String replace = "1,{ },2";
the offset is not correct for Highlighting
--
Weiwei Wang
Alex Wang
王巍巍
Room 403, Mengmin Wei Building
Computer Science Department
Gulou Campus of Nanjing University
Nanjing, P.R.China, 210093
Homepage: http://cs.nju.edu.cn/rl/weiweiwang